[IOS] Objective-C

상태바(Status Bar) 숨기기

2019.10.01 13:06 2,027 0


Write example for Objective-C (The same code for SWIFT already wrote by @dennykim)

Create property for BOOL
@property (nonatomic,assign) BOOL statusBarHidden;

Set in info.plist View controller-based status bar appearance == YES
Go to ViewController and write the next code:

[super viewWillAppear:animated];

self.statusBarHidden = TRUE;
[self setNeedsStatusBarAppearanceUpdate];
    [super viewWillDisappear:animated];

    self.statusBarHidden = FALSE;
    [self setNeedsStatusBarAppearanceUpdate];   

- (BOOL)prefersStatusBarHidden {
    return self.statusBarHidden;


- (BOOL)prefersStatusBarHidden {
    return YES;

댓글목록 0

등록된 댓글이 없습니다.