Opaque navigation bar has black view behind it - ios

I'm manually hiding the navigation bar based on the scroll offset of the scrollview and it works 100% fine with a translucent navbar. However, if it's opaque (I need it to be to get the background colour correct), it produces this black bar which I can't seem to get to go away.

Related

How make the status bar opaque on Xamarin for app without navigation bar

I have a app that only have a form with a web view. When the web view scroll (it have a white background) the content slide behind the status bar, turning it transparent (only the battery indicator is visible. The rest text of the status bar was white and now is not visible).
I need the status bar to be opaque, and the content disappear behind it.
I try setting Status bar style to default, opaque style and none work. Neither putting the background color of the view.

Transparent Navigation bar becomes solid colour when scrolling to bottom

I have a tableview controller which has an embedded navigation bar. I managed to make my nav bar transparent. Now I am trying to achieve a solid color nav bar when I scroll towards the bottom of the table view. I am relatively new to iOS development. So please answer accordingly. I have no idea about scroll views either. I am not sure if I need to add a scroll view or not. If I do, where do I add it? Above the tableview or below it?
Here are a few images of what I want to achieve:
Image 1: Transparent nav bar, but bar button items are visible
Image 2: Transparent nav bar becoming white, bar button items' color changing from white to red
Image 3: This is the final image, where nav bar becomes white and bar button items become red.
If we scroll back up to the top, everything goes back to being the way it was at the start.

How to set the status bar to look like the system message app in iOS?

First, look at the picture below.
The middle is the message app, the left and right are my apps.
As you can see, in the message app, the status bar and top bar are both grey.
In the left one, the top bar is not translucent. The status bar and the top bar are all white.
In the right one, the top bar is translucent, which is the default style. The top bar is grey, but the status bar is white.
My question is, how to set the status bar to grey? As I can see in the target info part, the status bar style is already 'grey style(default). But it runs in white in my iPhone 5 iOS 7.1.1.
It turns out that #Panayot Panayotov is right. In Navigation controller, everything is fine.
I have compared the Navigation controller and Navigation bar alone. It turns out that in Navigation controller, the Navigation bar's x, y, width and height is 0, 0, 0, 0, which means it is right behind the status bar and also with a autolayout size. Since the status bar is translucent in iOS7, the color of the status bar and navigation bar are the same.
If you use Navigation bar alone, it has a fixed height 44, which can not be changed. That height can't cover the status bar and navigation bar items together. So they colors are different.
Finally the answer is to use navigation controller, not using navigation bar alone.

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.

Frame shifted up / empty space between view frame and tab bar with tab bar translucent set to "NO"

Here's my scenario:
I have a UITabBar that is using all the default settings and my app's tab bar translucency boolean is set to YES.
I wanted to change the colors of my tab bar, so I set the (iOS 7) tab bar's barTintColor to [UIColor whiteColor].
However, when I saw the app, this tab bar wasn't as white as it should be. After some time looking through the code, the culprit was the translucency of the tab bar. After setting it to "NO", my tab bar was definitely white. However, when I pushed to my next view controller, there was a black space between my view frame in any view controller and the tab bar. setting the tab bar's translucency to YES would get rid of this problem.
I'm not sure what code I can post since I don't do anything special in viewWillAppear or viewDidLoad in my viewcontrollers (other than setting some custom properties for my feature-set)
Any suggestions? Thanks.
edit: I also tried setting a white image in place of the tab bar's background and it did the same thing even though the translucency was set to "YES" this time.

Resources