标签:otf bool string div log UI type sel ret
-(bool)checkDevice:(NSString*)name
{
NSString* deviceType = [UIDevice currentDevice].model;
NSLog(@"deviceType = %@", deviceType);
NSRange range = [deviceType rangeOfString:name];
return range.location != NSNotFound;
}
NSString * nsStrIphone=@"iPhone"; NSString * nsStrIpod=@"iPod"; NSString * nsStrIpad=@"iPad"; bool bIsiPhone=false; bool bIsiPod=false; bool bIsiPad=false; bIsiPhone=[self checkDevice:nsStrIphone]; bIsiPod=[self checkDevice:nsStrIpod]; bIsiPad=[self checkDevice:nsStrIpad];
怎样推断 ios设备的类型(iphone,ipod,ipad)
标签:otf bool string div log UI type sel ret
原文地址:http://www.cnblogs.com/yangykaifa/p/6798676.html