一、判别当前手机系统版本号
//系统版本字符串
CGFloat currentSystemVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
NSLog(@"currentSystemVersion:%f",currentSystemVersion);
//currentSystemVersion:10.20000
二、获取当前手机系统名称
//系统版本
NSString *currentSystemName = [[UIDevice currentDevice] systemName];
NSLog(@"currentSystemName:%@",currentSystemName);
//currentSystemName:iOS
三、获取设备类型
NSString* deviceModel = [[UIDevice currentDevice] model];
if([deviceModel isEqualToString:@"iPhone"]) {
//iPhone
}
else if([deviceModel isEqualToString:@"iPod touch"]) {
//iPod Touch
}
else {
//iPad
}
NSLog(@"deviceModel is:%@",deviceModel);