Apple has released the latest XCode version5, some iOS apps which runs well in the earlier versions of the XCode,but shows some problems when runs under XCode5, Navigation bar issue is one of the most common issues when the app runs with XCode5 and iOS7 environment. Some of the the common navigation bar issues are listed below.
Prevent navigation bar from hiding content
In some apps, navigation bar hides the top view of the content when they run in XCode5, the top view covers some of the content, here are solution on how to prevent the navigation bar hiding the top view of the content.
To hide navigation bar:
// Hide the top navigation bar.
[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.shadowImage = [UIImage new];
self.navigationController.navigationBar.translucent = YES;
//To show navigation bar
self.navigationController.navigationBar.translucent = NO;
Prevent navigation bar from shifting down
In some apps navigation bar automatically shift down when they run under XCode5. The below code can can prevent the navigation bar from automatically shifting down.
Apple iOS7 has the default Controller translucent property value is YES, setting up the translucent property value to NO, can prevent this problem.
self.navController.navigationBar.translucent = NO;
This above code line fix the view below the navigation bar.
Prevent the app view to overlap with the navigation bar and status bar
Some of the apps shows problems with overlapping app view with the status bar and the navigation bar in the iOS7 devices. It requires to reposition the windows frame and the default translucent property should be set to No, the below code can resolve the problem.
self.window.frame = CGRectMake(0, 20, self.window.frame.size.width, self.window.frame.size.height – 20);
Latest posts by sandeep.kmishra (see all)
- Estimote Beacons- Real World Context and Applications - February 27, 2014
- iOS7 autolayout for Automatic positioning and resizing UI elements - January 30, 2014
- Why to use mobile apps for vacation rentals - January 30, 2014