十二:判断设备//设备名称return [UIDevice currentDevice].name; //设备型号,只可得到是何设备,无法得到是第几代设备return [UIDevice currentDevice].model; //系统版本型号,如iPhone OS return [UIDevi...
分类:
移动开发 时间:
2014-11-27 18:15:57
阅读次数:
269
IOS长时间后台运行的实现代码1、检查设备是否支持多任务Apple出于性能的考虑,并不是所有的iOS设备升级到iOS4以后都支持多任务,比如iPhone 3G。如果你的应用在没有多任务特性时会出问题,为了保持应用的健壮性,你应该对此进行判断并处理。你可以通过调用UIDevice对象的multitas...
分类:
移动开发 时间:
2014-11-27 15:51:47
阅读次数:
158
问题:昨天做测试Case,发现一个网游APK运行界面,uiautomator无法捕捉获取。因而输入的时候只得运用(dut.onclick(int a, int y))坐标点击的方法来输入用户名和密码。既无法具有屏幕的适应性,也使得输入代码繁杂,容易出错。解决方法: 使用UiDevice.getIns...
分类:
移动开发 时间:
2014-11-25 01:41:59
阅读次数:
593
#define IOS7 ([[UIDevice currentDevice].systemVersion doubleValue]>=7.0)告诉系统不要把图片渲染成系统的颜色(蓝色) controller.tabBarItem.selectedImage=[[UIImage imageNamed...
分类:
其他好文 时间:
2014-11-24 00:39:46
阅读次数:
243
使用UiDevice获取设备信息获取设备名称let name = UIDevice.currentDevice().name获取设备系统名称let systemName = UIDevice.currentDevice().systemName获取系统版本let systemVersion = UI...
分类:
移动开发 时间:
2014-11-21 17:52:57
阅读次数:
175
异步请求:
-(BOOL)getOnlyKey1
{
NSString *myUUIDStr = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
__block bool isTrue = false;
AFHTTPRequestOperationManager *manager...
分类:
其他好文 时间:
2014-11-20 12:07:25
阅读次数:
144
iOS的SDK中提供了UIDevice,NSBundle,NSLocale,UIScreen等类来获取设备、app等相应的信息。UIDevice用于获取设备相应的信息,如设备名称、设备唯一标识、系统名称、系统版本号、设备模式、本地设备模式等。NSBundle用于获取App相应的信息,如应用名称、应用...
分类:
移动开发 时间:
2014-11-17 15:24:44
阅读次数:
234
添加AddressBook这个包;然后#import //取得本地通信录名柄 ABAddressBookRef addressBook; if ([[UIDevice currentDevice].systemVersion floatValue] >= 6.0){ ...
分类:
其他好文 时间:
2014-11-13 18:30:43
阅读次数:
207
UIDeviceOrientationorientation;orientation=[[UIDevicecurrentDevice]orientation];switch(orientation){caseUIDeviceOrientationFaceUp:self.orientationLabel.text=@"FaceUp";break;caseUIDeviceOrientationFaceDown:self.orientationLabel.text=@"FaceDown";break;caseUID..
分类:
移动开发 时间:
2014-11-06 02:10:21
阅读次数:
174
在IOS7以上,navigationbar车档界面的解决方法.在viewDidload中.添加以下代码. if( ([[[UIDevice currentDevice] systemVersion] doubleValue]>=7.0)) { self.edgesForExtendedLayout ...
分类:
移动开发 时间:
2014-11-05 21:10:32
阅读次数:
172