如何判断ios设备类型
来源:互联网 发布:东莞淘宝美工专业培训 编辑:程序博客网 时间:2024/04/30 03:55
功能函数:
- -(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];
0 0
- 如何判断ios设备类型
- 如何判断IOS设备类型
- 如何判断ios设备类型
- 如何判断ios设备类型
- iOS 设备类型判断
- 判断iOS设备类型
- ios设备类型判断
- 判断 iOS 设备类型
- 如何判断iOS设备
- 如何判断 ios设备的类型(iphone,ipod,ipad)
- 如何判断 ios设备的类型(iphone,ipod,ipad)
- 如何判断 ios设备的类型(iphone,ipod,ipad)
- 如何判断 ios设备的类型(iphone,ipod,ipad)
- 如何判断 ios设备的类型(iphone,ipod,ipad)
- 如何判断 ios设备的类型(iphone,ipod,ipad)
- IOS代码判断设备类型
- IOS代码判断设备类型
- iOS 判断设备类型
- Linux date命令的用法
- 架构设计:系统间通信(6)——IO通信模型和Netty 上篇
- linux c获取股票脚本
- [iOS学习笔记]自学过程中积累的知识点(五)
- Mac下的抓包利器--Charles的安装与使用
- 如何判断ios设备类型
- 初试Jni & NDK
- 开灯问题
- RecyclerView CardView使用解析
- Android中内容观察者的使用---- ContentObserver类详解
- test
- SQL分组求每组最大值问题的解决方法收集
- linux python3.4获取股票脚本
- LeetCode题解——Convert Sorted List to Binary Search Tree