Alright, I am pulling my hair out here. I have a UITabBarController that I created in IB, and I set the UIViewController object type for my view in IB also for the UITabBarController. But when the app is run and the first tab comes up, the view that is set to show in that tab, is shifted up by the status bar height. So the top of my view is under that status bar. What gives here? I don't understand why this would happen. Has anyone else experienced this? If so how do I fix this?
Alright, I am pulling my hair out here. I have a UITabBarController that I created in IB, and I set the UIViewController object type for my view in IB also for the UITabBarController. But when the app is run and the first tab comes up, the view that is set to show in that tab, is shifted up by the status bar height. So the top of my view is under that status bar. What gives here? I don't understand why this would happen. Has anyone else experienced this? If so how do I fix this?
Thanks in advance.
If you are creating your view in IB, add the proper User Interface Elements in the desired view. So, if your app must show a status bar and a tab bar, for example, go to IB, select the view that is shifting up, open up the Inspector (cmd-I) and select the view Attributes. Then, in Simulated Interface Elements, add the status bar and tab bar, then reposition everything inside the view accordingly.
RE: UIView Shifted up when added to UITabController
Quote:
Originally Posted by miguel.campiao
If you are creating your view in IB, add the proper User Interface Elements in the desired view. So, if your app must show a status bar and a tab bar, for example, go to IB, select the view that is shifting up, open up the Inspector (cmd-I) and select the view Attributes. Then, in Simulated Interface Elements, add the status bar and tab bar, then reposition everything inside the view accordingly.
Ok that is weird. That is what i did at first and it did not work. So I went back unselected the Simulated interface elements both the Status bar and tab bar, saved it ran it, and then back in and reselected them and it worked.??? I dont know why but it is working now.