#define SYSTEM_VERSION_MORE_THAN_BFDATA(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)+ (NS....
分类:
移动开发 时间:
2015-08-10 17:46:35
阅读次数:
127
1.获取设备信息 NSLog(@"设备名称:%@",[[UIDevice currentDevice] systemName]); NSLog(@"版本号:%@",[[UIDevice currentDevice] systemVersion]); NSLog(@"设备名:%@",...
分类:
移动开发 时间:
2015-08-09 20:24:07
阅读次数:
143
1. 调用CLLocation前, 添加以下代码: // 获取授权 if ([UIDevice currentDevice].systemVersion.doubleValue >= 8.0) { // 始终允许访问位置信息 // [_manager r...
分类:
移动开发 时间:
2015-08-05 00:48:07
阅读次数:
134
iOS8 之后要自己写定位授权,否则就没有定位权限。
调用代码:
if ([[[UIDevice currentDevice] systemVersion] doubleValue] > 8.0)
{
//设置定位权限
仅ios8有意义
[locationManager requestWhenInUseA...
分类:
移动开发 时间:
2015-08-04 19:25:43
阅读次数:
143
- (void) action_openSettings:(id)sender{ if ([[UIDevice currentDevice]systemVersion].floatValue >= 8.0) { // 如果app没有Settings.bundle,则打开系统设置页...
分类:
其他好文 时间:
2015-08-01 15:41:30
阅读次数:
99
iOS的APP的应用开发的过程中,有时为了bug跟踪或者获取用反馈的需要自动收集用户设备、系统信息、应用信息等等,这些信息方便开发者诊断问题,当然这些信息是用户的非隐私信息,是通过开发api可以获取到的。那么通过那些api可以获取这些信息呢,iOS的SDK中提供了UIDevice,NSBundle,...
分类:
移动开发 时间:
2015-08-01 00:51:23
阅读次数:
140
/** 是否为今年 */- (BOOL)isThisYear{ if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) { NSCalendar *calendar = [NSCalendar curre...
分类:
其他好文 时间:
2015-07-31 12:24:56
阅读次数:
102
iPhone上的距离传感器通过UIDevice开启,开启后系统以Notification的方式通知。
①开启距离传感器,监听通知:
- (void)viewDidLoad {
[super viewDidLoad];
// 开启传感器在iOS3之后通过UIDevice的currentDevice的proximityMonitoringEnabled设置
[UIDevi...
分类:
其他好文 时间:
2015-07-27 23:01:59
阅读次数:
157
1,自定义颜色#define cctvColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]2,系统版本号#define IOS7 [[UIDevice currentDevice]...
分类:
其他好文 时间:
2015-07-24 06:56:06
阅读次数:
147
参考:http://blog.csdn.net/decajes/article/details/41807977
参考:http://zengrong.net/post/2152.htm
1. 获取设备的信息
UIDevice *device = [[UIDevice alloc] init];
NSString *name = device.name;
NSSt...
分类:
移动开发 时间:
2015-07-23 23:58:04
阅读次数:
527