码迷,mamicode.com
首页 >  
搜索关键字:uidevice    ( 271个结果
[iOS开发]使用Swift检测系统版本信息
### iOS系统版本获取 获取当前运行系统的版本号: let version = UIDevice.currentDevice().systemVersion // 获取版本号如: 7.1.2 ### 比较版本号 最主要的是与iOS 8版本进行比较: // 与iOS 8.0.0进行比较 // 注意...
分类:移动开发   时间:2014-11-04 22:57:29    阅读次数:365
IOS8下注册远程通知
if([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) { [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUs...
分类:移动开发   时间:2014-10-29 16:38:08    阅读次数:195
UiAutomator源码分析之注入事件
上一篇文章《UiAutomator源码分析之UiAutomatorBridge框架》中我们把UiAutomatorBridge以及它相关的类进行的描述,往下我们会尝试根据两个实例将这些类给串联起来,我准备做的是用如下两个很有代表性的实例: 注入事件获取控件 这一篇文章我们会通过分析UiDevice的pressHome这个方法来分析UiAutomator是如何注入事件的,下一篇文章会描述...
分类:其他好文   时间:2014-10-28 17:56:39    阅读次数:317
ios8中百度推送接收不到
ios8中百度推送接收类型会有所改变: //消息推送注册     if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)     {         [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUse...
分类:移动开发   时间:2014-10-28 17:53:08    阅读次数:156
xcode针对不同IOS版本的代码编译问题
有时候在项目中为了兼容低版本IOS系统,通常会针对不同的OS版本写不同的代码,例如:#define IS_IOS7_OR_LATER ([[UIDevice currentDevice].systemVersion floatValue] >=7.0)if(IS_IOS7_OR...
分类:移动开发   时间:2014-10-28 13:39:29    阅读次数:232
iOS 判断设备为iPhone还是iPad
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { self.viewController = [[[_ViewController alloc] initWithNibName:@"_ViewController_iPhone" bundle:nil] autorele...
分类:移动开发   时间:2014-10-23 22:50:34    阅读次数:203
iOS 调用地图导航
在IOS6.0系统后,兼容iOS5.0与iOS6.0地图导航,需要分两个步骤#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch...
分类:移动开发   时间:2014-10-22 12:39:37    阅读次数:290
iOS 判断iphone ipad 系统版本
#define ScreenWidth ([[UIScreen mainScreen] bounds].size.width) #define ScreenHeight ([[UIScreen mainScreen] bounds].size.height) #define iOS8 ([[[UIDevice currentDevice] systemVersion] floatValu...
分类:移动开发   时间:2014-10-13 17:51:40    阅读次数:129
适配iOS7uinavigationbar遮挡tableView的问题
//适配iOS7uinavigationbar遮挡tableView的问题 if([[[UIDevice currentDevice]systemVersion]floatValue]>=7.0) { self.edgesForExtendedLayout = UIRectEdgeNone...
分类:移动开发   时间:2014-10-10 19:01:24    阅读次数:135
iOS获取电量方法
ios简单的方法:[UIDevice currentDevice].batteryMonitoringEnabled = YES;doubledeviceLevel = [UIDevice currentDevice].batteryLevel;获取当前剩余电量, 我们通常采用上述方法。这也是苹果官...
分类:移动开发   时间:2014-10-10 17:05:54    阅读次数:315
271条   上一页 1 ... 21 22 23 24 25 ... 28 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!