Gradient appears behind navigation bar after app launch - ios

When my app is launching, as soon as the launch image is replaced by the initial view, a white gradient appears behind the navigation bar for one second (1st image) then disappears (2nd image).
I've tried to change the initial view to a different one to check if it's adding that gradient but it's still being added even with a plain UITableViewController.
Any clue or ideas on what might be causing this gradient during the transition from the launch image to the initial view?

update the viewwillappear method to set the navigation bar translucent
set
navigationbar.translucent = NO

Apparently this was a bug in iOS and has been fixed in 7.1

Related

Gray bar visible on iPhoneXS throughout app

Header image with gray bar on top
I am converting our app to fit correctly on newer iOS devices. We are using xib files for the UI. I added a launch screen storyboard to start off the new formatting. I noticed a gray bar across the top of every screen. It is not part of the view controller and I've tried removing the status bar but that only makes the text and icons disappear. I don't think it's the navigation bar either since we have that hidden as well. I have checked the Safe Area Layouts.
Any ideas on what this is and how I can remove it to extend my view all the way to the top? The blue in the image is the color I currently set the background of my view controller and we have a custom header view below that.
Using the View Hierarchy, as suggested, I was able to see the view behind my main view. I inspected the code for that initial view and found the previous developers had offset the Navigation Controller by 20. That is what created the bar on all the views. I have adjusted to remove the offset and it looks perfect now.

Whiteline issues while popping from view controller

My case navigation bar color different for two controllers. When I pop from a second view controller to first one there is white line glitch in UI appears. I don't understand why issues happen, is set navigation bar shadow image to nil and use a background image for setting navigation bar background.
one reason that can cause this, is extra content from other screens overlapping each other..
try to set each view controller to have
clipsToBounds = true
See Description from Apple...
Setting this value to true causes subviews to be clipped to the bounds
of the receiver. If set to false, subviews whose frames extend beyond
the visible bounds of the receiver are not clipped. The default value
is false.
another cause is, some view controller has a background with clear color...
make sure each view controller has a non clear background.
EDIT
the question was not clear enough, it looks like I didn't understand well, try to change the tint color of navigation bar to clear.
Finally, I found my issues, issues are when I am setting a navigation bar from orange to white I set the translucent property of the navigation bar is true. which cause the problem for me to display a white line.

Xcode 8 storyboard view controllers all blue background

When I first created my storyboard all the elements on each UIViewController showed up just fine; however, after opening up my storyboard again the view controllers have turned all blue.
Is this some kind of issue with Xcode or is there a setting that turns my view controllers blue?
I have checked each subview's (UIViews, UIImageViews, etc.) tint color and background color.
I think you have to tap each of them to give them the tabbar icon, then it will become normal
Rashwan here says that having to add an image, while a good thing, is also a Xcode 8.0 bug that it turns your entire screen blue.
I added an image to the tab bar and it make my screen visible. However, the area where I added an image in the tab bar is now blue and it doesn't display properly when run on the simulator.
I think the solution is to upgrade Xcode past 8.0.

iOS 7 Translucent Tab Bar and Nav Bar

I am having an issue with the translucent UINavigationBar and UITabBar in iOS 7, whereby if I only have the UINavigationBar translucent it works as I would expect it to, however as soon as set the UITabBar to translucent I get a strange effect happening in one out the four tabs in the app. Let my explain with some images:
This image shows the interface where only the nav bar is set to translucent:
With this image showing the result of the user scrolling the content up and under the nav bar:
Now, this is how I would expect it to look, and when the user scrolls the content back from under the nav bar it looks as it did before. However if I also set the UINavigationBar to translucent, and scroll the content to under the nav bar, the result is different to the second image:
Event the tab bar doesn't look right to me. This next image shows that the look of the nav bar if now different to what it was before, when the content is scrolled back from underneath it:
Again, I also don't thing that the look of the tab bar is correct, as the next image shows a different tab with content underneath it, with only a subtle change to the look of the tab bar:
Has anyone else had similar issues to this? (This is all set up in a storyboard)
Well, this was an annoying one. I added a fifth tab which had a MKMapView in it. On running the app and selecting the fifth tab, the tint colour from the nav and tab bars was removed, so I did a search and came across MKMapView affecting UINavigationBar and UITabBar
The test device I was using had iOS 7.0.2 on it, which falls in line with the bug mentioned; so have therefore updated it to the 7.1, and low and behold everything looks as it should.

UISplitView with UITabbar

I have a strange one that I can not seem to fix. I am currently working on updating my app to iOS7. This all worked in iOS6. It is an universal app and thus uses same xib files. However the iPad uses UISplitViews on some. Like I said, this all worked in iOS6 oh this all works on the iPhone too.
The problem is a grey bar at the bottom. I changed the tab bar to be opaque to move views up properly as i had some UI clipped to bottom of views and that went underneath the tab bar, sidetracked there. But if i set it back to translucent bar, it goes underneath but stretched properly. if i dont, it adds a bar. Other tabs work fine when NOT using splitview.
The UISplitviewController is added programmatically.
See attached image for better description.
This I have tried:
Added autoresize on splitview
Checked xib for subviews in the splitviews to have auto resize
Tried to force splitview to be screen bounds
Removed clips to bounds on all views
Removed autoresize subviews
Any ideas would be welcomed.
Thank you all.
UPDATE:
setting the background colour the uisplitview, it does colour the bar black. So the uisplitview is definitely stretching to it.
I subclassed UISplitViewController and added the line below to viewDidLoad and that fixed the grey line.
self.extendedLayoutIncludesOpaqueBars = YES;
I believe I have found an alternative solution for you. I have had the exact same problem, mostly because we are both doing something against Apple's Guidelines which is having a SplitViewController nested within a Tabbar controller (SplitView should be the root view). This was okay in iOS 5/6, but now in iOS 7 there are far too many side effects to achieve this.
The reason you see your view stretch completely when you set the bar to be translucent is because the bar is NOT taken into account when drawing the view. When you set translucent to false, it is then taken into account of the view and you will see that grey bar there because that's your view pretending there's a tabbar at the bottom of the screen.
And as always, a SplitViewcontroller's height cannot be changed, as it is determined by the visible window height.
I tried everything you did and then some. The real solution came from using a third-party Split View Controller.
I recommend switching over to https://github.com/mattgemmell/MGSplitViewController . This split view controller is actually one large View with container views living inside of it. Because of this, you avoid all the side effects of putting an actual split view controller within a tab bar.
If that doesn't float your boat, you could create your own solution which follows the same idea of having one UIViewController with two container views contained in it, though the people behind MGSplitViewController did a good job of that already.
This was the only way I was able to solve this issue, let me know if you find an alternative.
Instead of creating a subclass for UISplitViewController, I just added this code on my master's viewDidLoad:
self.splitViewController?.extendedLayoutIncludesOpaqueBars = true
For the controller that is the detail view of UISplitViewController you just do this:
-(UITabBarController*)tabBarController{
return nil;
}

Resources