首页 > 移动平台 > 详细

如何判断 ios设备的类型(iphone,ipod,ipad)

时间:2014-07-18 16:37:30      阅读:354      评论:0      收藏:0      [点我收藏+]
-(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),布布扣,bubuko.com

如何判断 ios设备的类型(iphone,ipod,ipad)

原文:http://blog.csdn.net/huang2009303513/article/details/37902237

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!