Reputation: 11218
I am developing an app compatible with iOS 7. My status bar content like network, battery life etc. appearing at my header image. Please have a look at the screenshot and please guide me how I can resolve this.
** This app is compatible with iOS>=5.0 SDK.
Upvotes: 0
Views: 95
Reputation: 386
You have several options. For example:
1) You can use iOS 6/7 Deltas in Size inspector while editing your storyboard/nib.
2) You can detect iOS in the code and move all views for
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
//in viewDidLoad
if (SYSTEM_VERSION_LESS_THAN(@"7.0"))
{
CGRect frame = m_web_view.frame;
frame.origin.y = 0;
frame.size.height += 20;
m_web_view.frame = frame;
}
3) You can hide status bar
Upvotes: 1
Reputation: 25
Try this:
-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
Upvotes: 0