Hi I have tried the following but am unable to remove the status bar from my application:
All these used to work fine in the 100 applications I did before but I made a recent xcode upgrade..
Is there some other secret way of getting rid of the status bar in the app? Do I need to journey to Apple headquarters and slay a red dragon ?
Found the solution
In your apps plist file add a row call it "View controller-based status bar appearance" and set it to NO
SOURCE - OPENFL
viewDidload
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
Add this method
- (BOOL)prefersStatusBarHidden
{
return YES;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.