1. 首先
在Info.plist
里添加布尔类型的
属性 | 值 |
---|---|
Status bar is initially hidden | YES |
View controller-based status bar appearance | NO |
2. 引导页添加
#pragma mark --- "立即体验"点击进入App
-(void)intoApp{
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
delegate.window.rootViewController = self.nav;
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
}
或:
__weak AppDelegate *weakSelf = self;
self.introductionView.didSelectedEnter = ^() {
weakSelf.introductionView = nil;
[application setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
};
3. 最后
回到AppDelegate.m中新旧版本判断的地方别忘了正常进入时也要让状态栏显示。
[application setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];