w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
iOS hides statusBar from child View Controller

Try this,

keep a BOOL to check B viewController is displayed or not. And in preferStatusBarHidden

- (BOOL)prefersStatusBarHidden {
    if (bDisplayed) {
        return YES;
    }
    return NO;
}

and on adding B viewController

bDisplayed = YES;
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
{
    // if iOS 7
    [self prefersStatusBarHidden];
    [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
    // if iOS 6
    [[UIApplication sharedApplication] setStatusBarHidden:YES
withAnimation:UIStatusBarAnimationSlide];
}




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.