iOS点击按钮隐藏状态栏
来源:互联网 发布:windows phone 10安卓 编辑:程序博客网 时间:2024/06/06 01:13
@interface SecondViewController ()@property (nonatomic, assign,getter=isHideStatus) BOOL hideStatus;@end@implementation SecondViewController- (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor]; UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 300, 200)]; button.center = self.view.center; button.backgroundColor = [UIColor blueColor]; [button setTitle:@"隐藏导航栏" forState:UIControlStateNormal]; [button addTarget:self action:@selector(hideFrame) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:button]; self.hideStatus = [UIApplication sharedApplication].statusBarHidden; // Do any additional setup after loading the view, typically from a nib.}- (void)hideFrame { [self setNeedsStatusBarAppearanceUpdate];//调用该方法后系统会调用prefersStatusBarHidden方法 self.hideStatus = !self.hideStatus;}- (BOOL)prefersStatusBarHidden{ return self.hideStatus;}
0 0
- iOS点击按钮隐藏状态栏
- iOS - 隐藏Navigation & 隐藏状态栏:
- iOS隐藏状态栏
- ios 如何隐藏状态栏
- ios 隐藏系统状态栏
- IOS 隐藏状态栏
- ios 如何隐藏状态栏
- iOS 状态栏的隐藏
- iOS如何隐藏状态栏
- iOS 隐藏状态栏
- ios 7 隐藏状态栏
- ios 隐藏状态栏,时间
- IOS 隐藏状态栏
- ios 隐藏状态栏
- ios 隐藏状态栏
- 隐藏状态栏ios
- IOS隐藏状态栏
- [IOS]隐藏状态栏
- SpringMvc支持跨域和自定义header
- STM8S的按键PWM调光灯历程
- 记录Maven和Mybatis整合时打包漏掉mapper的xml文件及其它资源
- 【NOIP模拟题】【数学归纳法】【GCD】2016.11.16 第一题 LGTB 与序列 题解
- Java实现数据压缩 zlib
- iOS点击按钮隐藏状态栏
- Android:pt 、sp、dp之间的换算
- 重力感应
- PostThreadMessage和GetMessage
- centos7安装出现license information(license not accepted)解决办法
- c3p0初始化DataSource报错NoClassDefFoundError:Could not initialize class com.mchange.v2.c3p0.ComboPooledDa
- 注册网页完整案例(jQuery Mobile、validate表单验证、ajax或post、php)
- iOS 自定义Cell按钮的点击代理事件
- 服务型CMDB的消费场景