系统功能显示相关的设置


1、防止屏幕暗掉锁屏
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

2、隐藏时间状态栏
[[UIApplication sharedApplication]setStatusBarHidden:YES];

3、隐藏导航栏
[self.navigationController setNavigationBarHidden:YES];

4、 状态栏的网络活动风火轮是否旋转
这是在iPhone左上部的状态栏显示的转动的图标指示有背景发生网 络的活动。
[UIApplication sharedApplication].networkActivityIndicatorVisible,默认值是NO。

5、键盘透明
textField.keyboardAppearance = UIKeyboardAppearanceAlert;

6、设备状态判断
  //设备名称
  return [UIDevice currentDevice].name;
        
  //设备型号,只可得到是何设备,无法得到是第几代设备
   return [UIDevice currentDevice].model;
        
  //系统版本型号
   return [UIDevice currentDevice].systemVersion;
        
   //系统版本名称,如6.1.3
   return [UIDevice currentDevice].systemName;
   //判断是否为iPhone
   #define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
        
   //判断是否为iPad
   #define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
        
  //判断是否为ipod
  #define IS_IPOD ([[[UIDevice currentDevice] model] isEqualToString:@"iPod touch"])
        
  //判断是否为iPhone5
  #define IS_IPHONE_5_SCREEN [[UIScreen mainScreen] bounds].size.height >= 568.0f
                        && [[UIScreen mainScreen] bounds].size.height < 1024.0f


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值