//隐藏Status
//版本小于7.0
if (VERSION < 7.0) {
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
//版本大于7.0 实现该方法
- (BOOL)prefersStatusBarHidden
{
return YES;
}
//修改颜色
info.plist中添加
View controller-based status bar appearance值为NO
Status bar style UIStatusBarStyleLightContent文字白色
Gray style (default)文字黑色
//导航视图push隐藏tabBar
UIViewController * vc = [[UIViewController alloc] init];
vc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:vc animated:YES];
//手动旋转
CGRect frame = [[UIScreen mainScreen] bounds];
static BOOL isOO = NO;
[UIView animateWithDuration:0.25 animations:^{
if (isOO == NO) {
self.view.transform = CGAffineTransformMakeRotation(90/180.0*M_PI);
}else {
self.view.transform = CGAffineTransformIdentity;
}
self.view.frame = frame;
isOO = !isOO;
} completion:^(BOOL finished) {
}];
//如果iOS版本da'yu大于7 设置不能右滑返回上一级导航视图
if ([[[UIDevice currentDevice] systemVersion] floatValue]>=7.0) {
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}
//版本小于7.0
if (VERSION < 7.0) {
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
//版本大于7.0 实现该方法
- (BOOL)prefersStatusBarHidden
{
return YES;
}
//修改颜色
info.plist中添加
View controller-based status bar appearance值为NO
Status bar style UIStatusBarStyleLightContent文字白色
Gray style (default)文字黑色
//导航视图push隐藏tabBar
UIViewController * vc = [[UIViewController alloc] init];
vc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:vc animated:YES];
//手动旋转
CGRect frame = [[UIScreen mainScreen] bounds];
static BOOL isOO = NO;
[UIView animateWithDuration:0.25 animations:^{
if (isOO == NO) {
self.view.transform = CGAffineTransformMakeRotation(90/180.0*M_PI);
}else {
self.view.transform = CGAffineTransformIdentity;
}
self.view.frame = frame;
isOO = !isOO;
} completion:^(BOOL finished) {
}];
//如果iOS版本da'yu大于7 设置不能右滑返回上一级导航视图
if ([[[UIDevice currentDevice] systemVersion] floatValue]>=7.0) {
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}