Answer the question
In order to leave comments, you need to log in
Status bar is not hidden in iOS 7?
I wrote plist
View controller-based status bar appearance - NO
DOES NOT work
As in the apple manual:
@property(nonatomic, getter=isStatusBarHidden) BOOL statusBarHidden;
- (void)setStatusBarHidden:(BOOL)hidden;
Doesn't work either.
Each controller has - Status Bar NONE
Already tried everything - zero.
Answer the question
In order to leave comments, you need to log in
I did it like this - everything works.
Set "View controller-based status bar appearance" to NO in your plist, then add this code:
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
or
alternatively, you can leave "View controller-based status bar appearance" on, and in your view controllers, add this method:
- (BOOL) prefersStatusBarHidden {
return YES;
}
Try this in the root controller
- (void)viewDidLoad
{
[super viewDidLoad];
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
{
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
}
else
{
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
}
// Add this method
- (BOOL)prefersStatusBarHidden {
return YES;
}
Registered - now it gave out such crap
fatal error: malformed or corrupted AST file: 'Unable to load module "/Users/lubimow/Library/Developer/Xcode/DerivedData/ModuleCache/3OQQ9G3BB8KEO/Darwin.pcm": file not found'
note: after modifying system headers, please delete the module cache at '/Users/lubimow/Library/Developer/Xcode/DerivedData/ModuleCache/3OQQ9G3BB8KEO'
1 error generated.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question