### iOS系统版本获取 获取当前运行系统的版本号: let version = UIDevice.currentDevice().systemVersion // 获取版本号如: 7.1.2 ### 比较版本号 最主要的是与iOS 8版本进行比较: // 与iOS 8.0.0进行比较 // 注意...
分类:
移动开发 时间:
2014-11-04 22:57:29
阅读次数:
365
if([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) { [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUs...
分类:
移动开发 时间:
2014-10-29 16:38:08
阅读次数:
195
上一篇文章《UiAutomator源码分析之UiAutomatorBridge框架》中我们把UiAutomatorBridge以及它相关的类进行的描述,往下我们会尝试根据两个实例将这些类给串联起来,我准备做的是用如下两个很有代表性的实例:
注入事件获取控件
这一篇文章我们会通过分析UiDevice的pressHome这个方法来分析UiAutomator是如何注入事件的,下一篇文章会描述...
分类:
其他好文 时间:
2014-10-28 17:56:39
阅读次数:
317
ios8中百度推送接收类型会有所改变:
//消息推送注册
if ([[[UIDevice
currentDevice] systemVersion]
floatValue] >= 8.0)
{
[[UIApplication
sharedApplication] registerUserNotificationSettings:[UIUse...
分类:
移动开发 时间:
2014-10-28 17:53:08
阅读次数:
156
有时候在项目中为了兼容低版本IOS系统,通常会针对不同的OS版本写不同的代码,例如:#define IS_IOS7_OR_LATER ([[UIDevice currentDevice].systemVersion floatValue] >=7.0)if(IS_IOS7_OR...
分类:
移动开发 时间:
2014-10-28 13:39:29
阅读次数:
232
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.viewController = [[[_ViewController alloc] initWithNibName:@"_ViewController_iPhone" bundle:nil] autorele...
分类:
移动开发 时间:
2014-10-23 22:50:34
阅读次数:
203
在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
#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的问题 if([[[UIDevice currentDevice]systemVersion]floatValue]>=7.0) { self.edgesForExtendedLayout = UIRectEdgeNone...
分类:
移动开发 时间:
2014-10-10 19:01:24
阅读次数:
135
ios简单的方法:[UIDevice currentDevice].batteryMonitoringEnabled = YES;doubledeviceLevel = [UIDevice currentDevice].batteryLevel;获取当前剩余电量, 我们通常采用上述方法。这也是苹果官...
分类:
移动开发 时间:
2014-10-10 17:05:54
阅读次数:
315