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

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.

Related

UICollectionView scroll changes color of navigation and tab how

I am building an iOS application and have done all the layouts using storyboards and auto layout.
I have a ViewController as follows
For the CollectionView I have specified it to have 4 cells.
The issue I'm having that when I scroll vertically, the background colour of the Navigation bar and Tab bar changes.
How can I make sure that the background colour is not changed when I scroll.
This is what happening when I scroll - You can see the background colour of the navigation and tab bar change.
your navigation bar and tab bar translucent bydefault so add this this code
self.navigationController.navigationBar.translucent = NO;
self.navigationController.tabBarController.tabBar.translucent = NO;
As suggested you can set the toolbar and navigation bar's translucent property to false, but you can also do this in the storyboard:

How to make tab bar lay over content in Swift?

I want my tab bar to be translucent and blur the content behind it, but when I set its color to clear color it turns black instead. Currently I have my tab bar created programmatically in the app delegate. I made a class function called getTabBarController and configured my tab bar in there, and I call it in app delegate to return the tab bar. At last, I write
let vc = TabBarInitializer.getTabBarController()
self.window!.rootViewController = vc. Am I creating my tab bar incorrectly? How do I make the tab bar be on top of my content so that the translucent effect works?
You have place view or content behind tabbar which you have to show instead of black.
So when tab transparent, view behind the tabbar become visible.

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.

navigation bar gets under the status bar in 4" screens

I embedded a navigation controller in a tab bar controller, the problem is that the navigation bar (with the blue color) get under the status bar. So the status bar appear transparent because it shows what is under. Here is a screenshot:
I tried to modify the status bar directly in Attributes Inspector to black and Translucent black, also disabled autolayout although i know it has nothing to do with such issue. Anyway, nothing is fixed. I used to work with that in iOS5, but since iOS6 and the new 4" storyboard screen, i got this issue.
There is a misunderstanding here. The navigation bar is not "under" the status bar. This is iOS 6's new color-adopting status bar. You can read more here.
If you do not like this behavior, your only option is to make the status bar black. Take a look at the project properties page.

Resources