复制IOS
照片库样式,但是当我控制uistatusbar
显示或隐藏时,视图会上下晃动。
if (isDisplayNav) {
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
[self.navigationController setNavigationBarHidden:YES animated:YES];
isDisplayNav = NO;
}else {
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
[self.navigationController setNavigationBarHidden:NO animated:YES];
isDisplayNav = YES;
}
==========================回答=======================
我找到了答案,你可以在 viewDidLoad 方法中插入 [self setWantsFullScreenLayout:YES],状态栏的高度不会包含在 viewController 中