yangykaifa
-(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];


分类:

技术点:

相关文章:

  • 2021-10-05
  • 2021-10-17
  • 2021-12-03
  • 2021-10-05
  • 2022-12-23
  • 2021-08-16
  • 2021-10-30
猜你喜欢
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-10-05
  • 2021-12-13
  • 2021-12-03
相关资源
相似解决方案