iphone开发技术 - 获取iOS系统版本

iphone开发技术 - 获取iOS系统版本  

2011-01-15 22:07:15|  分类: iPhone开发 |  标签:uidevice  nslog  iphone  ios  currentdevice  |字号 订阅

 
 

NSLog([[UIDevice currentDevice] name]); // Name of the phone as named by user 

NSLog([[UIDevice currentDevice] uniqueIdentifier]); // A GUID like string 

NSLog([[UIDevice currentDevice] systemName]); // "iPhone OS" 

NSLog([[UIDevice currentDevice] systemVersion]); // "2.2.1" 

NSLog([[UIDevice currentDevice] model]); // "iPhone" on both devices 

NSLog([[UIDevice currentDevice] localizedModel]); // "iPhone" on both devices 

float version = [[[UIDevice currentDevice] systemVersion] floatValue]; 

猜你喜欢

转载自lishuaishuai.iteye.com/blog/1984413
今日推荐