码迷,mamicode.com
首页 >  
搜索关键字:uidevice    ( 271个结果
ios开发常用的宏
转自 http://www.cocoachina.com/bbs/read.php?tid=1719540 #define NavigationBar_HEIGHT 44 #define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) # ...
分类:移动开发   时间:2017-05-07 14:48:41    阅读次数:234
自定义UIButton 实现图片和文字 之间距离和不同样式
1.UIButton+ImageTitleSpace.h 2.UIButton+ImageTitleSpace.m 3.使用 1.导入头文件 2.在懒加载 按钮中调用 ...
分类:其他好文   时间:2017-05-04 22:02:58    阅读次数:417
怎样推断 ios设备的类型(iphone,ipod,ipad)
-(bool)checkDevice:(NSString*)name { NSString* deviceType = [UIDevice currentDevice].model; NSLog(@"deviceType = %@", deviceType); NSRange range = [de ...
分类:移动开发   时间:2017-05-02 23:39:57    阅读次数:209
Swift听筒模式和扬声器模式切换
本文只作自用笔记,不喜忽喷,诚谢纠错. 听筒模式 UIDevice.current.isProximityMonitoringEnabled = true //开启红外线功能 let session = AVAudioSession() do{ try session.setCategory(AVA ...
分类:编程语言   时间:2017-05-02 11:54:37    阅读次数:432
AFN同步异步请求
异步请求: -(BOOL)getOnlyKey1 { NSString *myUUIDStr = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; __block bool isTrue = false; AFHTTPReque ...
分类:其他好文   时间:2017-04-12 11:18:48    阅读次数:194
iOS js
[webView stringByEvaluatingJavaScriptFromString:@"document.getElementById(\"idNumber\").value=\"6217000x10055975513\";"]; [webView stringByEvaluatingJ ...
分类:移动开发   时间:2017-04-07 10:17:10    阅读次数:242
UIDevice之获取设备信息
UIDevice这个类提供了一个代表当前设备的一个实例。从这个实例中可以获得有关设备如指定名称,信息设备模型,和操作系统名称和版本。UIDevice直接继承自NSObject。 UIDevice类可以提供了多种属性、类函数及状态通知,帮助我们全方位了解设备状况。从检测电池电量到定位设备与临近感应,U ...
分类:其他好文   时间:2017-02-16 15:35:17    阅读次数:181
iOS 系统版本的判断
iOS 宏定义系统版本的判断 #define iOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) #define iOS7Later ([UIDevice currentDevice].systemVersion.f ...
分类:移动开发   时间:2017-01-11 10:10:37    阅读次数:504
常用的颜色宏定义
// 获得当前的版本 #define iOS(version) ([UIDevice currentDevice].systemVersion.doubleValue >= (version)) #define ColorA(r, g, b, a) [UIColor colorWithRed:(r) ...
分类:其他好文   时间:2017-01-06 18:35:39    阅读次数:171
iOS_传感器的使用
一、距离传感器。 大概解释一下距离传感器的功能:它会根据你和iphone间距离不同做出不同的响应。 [objc] view plain copy print? //打开距离传感器 [UIDevice currentDevice].proximityMonitoringEnabled = YES; / ...
分类:移动开发   时间:2016-12-30 18:45:36    阅读次数:304
271条   上一页 1 2 3 4 5 ... 28 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!