- (void)viewDidLoad{ [super viewDidLoad]; //获取当前设备操作系统及版本 NSString *systemName =[[UIDevice currentDevice]systemName]; NSString *system =[[UIDevice...
分类:
移动开发 时间:
2014-10-10 17:54:04
阅读次数:
203
在iOS系统中提供了系统版本的判断函数,因此我们可以很容易得到他的当前系统版本:[[UIDevice currentDevice] systemName];//系统名字[[UIDevice currentDevice] systemVersion];//系统版本号[[UIDevice current...
分类:
移动开发 时间:
2014-10-10 17:07:34
阅读次数:
173
注册方式:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings
...
分类:
移动开发 时间:
2014-10-10 15:13:54
阅读次数:
173
注意:本文章下的代码有个别变量未知,所以是不能直接跑通的,我也是转别人的在IOS6.0系统后,兼容iOS5.0与iOS6.0地图导航,需要分两个步骤#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersio...
分类:
移动开发 时间:
2014-10-05 02:18:17
阅读次数:
497
【获取iOS设备唯一标识】1.已禁用-[UIDevice uniqueIdentifier] 苹果总是把用户的隐私看的很重要。-[UIDevice uniqueIdentifier]在iOS5实际在iOS5的时候已经被遗弃了,但是iOS7中已经完全的禁用了它。Xcode5甚至不会允许你编译包含了指....
分类:
移动开发 时间:
2014-10-02 13:08:52
阅读次数:
193
假设需要解决的问题:写代码时遇到一种情况,就是需要判断iOS版本,可能低版本和高版本需要增减一些代码,此时,如何判断iOS版本?...
分类:
移动开发 时间:
2014-09-29 16:18:31
阅读次数:
206
UIDevice类是一个单例,其唯一的实例( [UIDevice currentDevice] ) 代表了当前使用的设备。通过这个实例,可以获得设备的相关信息(包括系统名称,版本号,设备模式等等)。也可以使用使用该实例来监测设备的特征(比如物理方向)。NSString *strName = [[UI...
分类:
移动开发 时间:
2014-09-29 11:52:10
阅读次数:
179
iOS6和iOS7的适配:#define iOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0)#endif根据RGB设置一个全局背景色://2.获得RGB#define YLYColor(r,g,b) [UIColor ...
分类:
其他好文 时间:
2014-09-20 15:59:08
阅读次数:
273
获取iphone的系统信息使用[UIDevice currentDevice],信息如下:
[[UIDevice currentDevice] systemName]:系统名称,如iPhone OS
[[UIDevice currentDevice] systemVersion]:系统版本,如iOS 8.0
[[UIDevice currentDevice] mode...
分类:
其他好文 时间:
2014-09-19 17:38:55
阅读次数:
144