I have attached how UI looks on the different iOS versions.
This is my code below:
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:contactsViewController];
[self.viewController presentModalViewController:navController animated:YES];
iOS 6
iOS 7
First problem is status bar in iOS 6 I have not status bar. Second problem is overdrawing two views. How to solve it?
You may wish to use a resizable image:
[image resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0) resizingMode:UIImageResizingModeStretch];
Or, as AliSoftware suggested, set the extended layout edges to UIRectEdgeNone
(be sure to check if edgesForExtendedLayout
is supported (your app will crash if it ties to assign this property running on iOS 6.x device):
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
I would strongly invite you to read Apple's "UI Transition Guide" which explains all these differences between iOS6 and iOS7 and how to adapt your code accordingly.
The easiest way if you want your view to still be under your statusBar even in iOS7 is to set your UIViewController
's self.edgesForExtendedLayout = UIRectEdgeNone
in its viewDidLoad
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With