I have an app that was developed in iOS 6. But now in iOS 7 or even my app compiled for iOS 6, but running on an iOS 7 device the top navigation bar (the new giant one in iOS 7) my content is hidden. The top navigation bar covers it. If I manually move it down with CGRect it looks good in iOS 7, but now iOS 6 looks horrible (to much space above it).
The app was built with autolayout off because autolayout is way to difficult to get things setup correctly.
My question is, is there an easy way to move the content down for iOS 7 only? I really don't want to have to turn autolayout back on and spend a month trying to get all the UI elements back in place. The app is pretty sophisticated with 30+ screens and a lot of animating view on screens.
Way 1: Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.
If you want to remove the opacity or transparency from the sticky navigation bar, just navigate to Theme Options -> General -> Additional CSS and copy/paste this code and save changes. You could also manipulate the opacity by altering the value “1” at the end of the CSS statement.
Overview. A navigation controller is a container view that can manage the navigation of hierarchical contents. The navigation controller manages the current displaying screen using the navigation stack. Navigation stack can have “n” numbers of view controllers.
Go to Settings > Accessibility > Guided Access and toggle on Guided Access. Open an app and triple-click the Power button to enter Guided Access. There's no other way to get rid of the Home Bar.
I think there's still a little bit of misconception going around this layout problem even if iOS 7 was rolled out more than a year ago. So I eventually decided to elaborate further my answer.
Here's the thing.
Because automaticallyAdjustsScrollViewInsets
' default value is YES
, a pretty straightforward solution could be adding the following code:
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) { // if iOS 7
self.edgesForExtendedLayout = UIRectEdgeNone; //layout adjustements
}
into the ViewController's -viewDidLoad
method.
If you wish to remove the status bar quirk (due to the bar translucency, so it's not weird whatsoever) add self.navigationController.navigationBar.translucent = NO
. The default value is YES
.
Note: this has nothing to do with the content, it's related to the content because of translucency but that's an altogether different story!
Because extendedLayoutIncludesOpaqueBars
is NO
by default, self.navigationController.navigationBar.translucent = NO
means basically having
self.edgesForExtendedLayout = UIRectEdgeLeft | UIRectEdgeRight| UIRectEdgeBottom;
Or, more generally, something like that (it's like pseudocode to give an idea...)
BOOL enableTopEdge = extendedLayoutIncludesOpaqueBars && !navigationBarIsTranslucent
self.edgesForExtendedLayout = (enableTopEdge & UIRectEdgeTop) | UIRectEdgeLeft | UIRectEdgeRight | UIRectEdgeBottom;
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