ITeye博客

iOS获取当前系统的相关信息

landyer · 2012-01-12 15:44 · ios · 移动开发 · Markdown

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]; //获取版本号

if (version >= sdk number)

{

}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。