Question

My issue is that I cannot get rid of this orange background at the bottom of UITabBarController, does anyone have any idea how this can be rid of?

Detail: I have this UITabBarController and when I add a UIViewController to it, the UIViewController fits to the size within the UITabBarController ONLY in iOS 7 of Retina 4 inch screen. However, when I try this in iOS 6 of Retina 4, the background of UITabBarController is shown at the bottom of the window in orange.

Image

I have tried to solve this issue by:

1) Recreating the UITabBarController and manually setting contentsizeForViewInPopOver

2) NSLog the frame of UIViewController to make sure they are 320x568,960 and 1134 but they both show the same orange (I set the background of UITabBarController to be orange to verify)

3) Enlarged the mapview and the parent view of mapview but no result.

Note: the grey portion at the bottom of the image is all the tabbaritems, but they are not shown for this purpose.

I see no change and cannot figure this out. Can somebody please help me?

Thanks in advance!

Was it helpful?

Solution 2

After hours of research, I found what the cause was.

I had a method called -(void)showTabBar on my viewcontroller that was shown, and that set the frame/bounds to a specific frame which was specific for iOS 7 in Retina 4 display!

Now everything is good but thanks to @MrTJ for the hint on viewDidLayoutSubviews

OTHER TIPS

Set up 4 auto layout constraints of your map view to the main view of your view controller, one for each side (top, right, bottom, left), all with the value of zero. Screenshot of Interface Builder

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top