When hiding the statusbar my navigation bar moves up in iOS7 When hiding the statusbar my navigation bar moves up in iOS7 ios ios

When hiding the statusbar my navigation bar moves up in iOS7


You can create a custom UIView with its frame as

customView.frame=CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.height);

Also hide your status bar by following the below steps

Go to info.plist and add two attributes if not present. set "Status bar is initially hidden" to YES and set UIViewControllerBasedStatusBarAppearance to NO. This will hide status bar for your app.


Add this code in your view Controller:

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]){    self.edgesForExtendedLayout = UIRectEdgeNone;}


matomo