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

最新文章

  1. Python 学习第十九天 django知识
  2. Vue - 在v-repeat中使用计算属性
  3. eclipse启动不了
  4. 用CSS3实现背景的固定
  5. web.xml中同一servlet/filter配置多个url-pattern
  6. 解决oracle启动的错误: ORA-00119 ORA-00132
  7. cf C. Arithmetic Progression
  8. 【android】adb连接几个常见问题(遇到再新增)
  9. 执行testng appium用例失败,自动截图
  10. nginx配置文件详细解读
  11. Python 子进程不能input
  12. sklearn中的朴素贝叶斯模型及其应用
  13. GNU Screen Usage
  14. TensorFlow实战Google深度学习框架8-9章学习笔记
  15. python基础07_tuple_dict
  16. ubuntu14.04 cpu-ssd
  17. BZOJ 1283: 序列
  18. thinkphp 前台测试
  19. Xshell传输文件
  20. 关于用GetManifestResourceNames读不出资源文件的解决

热门文章

  1. javaScript 笔记(5) --- jQuery(上)
  2. 【09】react 之 表单组件
  3. Mysql和sqlServer命令比较
  4. BZOJ 4766: 文艺计算姬
  5. 洛谷P2668 斗地主 [NOIP2015]
  6. 为IIS添加json扩展类型文件的MiME类型
  7. c# dynamic,maybe I should say it is just some shortcut for "Object", box and unbox, without the cast
  8. visual studio 插件 resharper 使用指南
  9. 牛客网 牛客练习赛13 B.幸运数字Ⅱ-数组 or DFS
  10. (21)Oracle表查询进阶