//判断是否为iPad#define ISIPAD [[[UIDevice currentDevice].model substringToIndex:4] isEqualToString:@"iPad"]//屏幕高度#define SCREEN_HEIGHT ( ISIPAD ? 480 : [[...
分类:
其他好文 时间:
2015-05-06 17:31:52
阅读次数:
108
获取iOS系统版本 --- UIDevice的使用UIDevice类是一个单例,其唯一的实例( [UIDevice currentDevice] ) 代表了当前使用的设备。通过这个实例,可以获得设备的相关信息(包括系统名称,版本号,设备模式等等)。也可以使用使用该实例来监测设备的特征(比如物理方向)...
分类:
移动开发 时间:
2015-05-04 20:03:08
阅读次数:
154
//手机序列号 NSString* identifierNumber = [[UIDevice currentDevice] uniqueIdentifier]; NSLog(@"手机序列号: %@",identifierNumber); //手机别名: 用户定义的名称 NSString* user...
分类:
移动开发 时间:
2015-05-04 17:11:48
阅读次数:
136
iPad开发(Universal Applications)一、iPad1、判断是否在iPad上 BOOL iPad = ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad);二、UISplitView....
分类:
其他好文 时间:
2015-05-03 11:55:22
阅读次数:
174
UUID(Universally Unique IDentifier)是基于iOS设备上面某个单个的应用程序,只要用户没有完全删除应用程序,则这个UUID在用户使用该应用程序的时候一直保持不变。如果用户删除了这个应用程序,然后再重新安装,那么这个UUID已经发生了改变。通过调用[[UIDevice ...
分类:
其他好文 时间:
2015-04-29 21:18:40
阅读次数:
142
1.已禁用-[UIDevice uniqueIdentifier]
苹果总是把用户的隐私看的很重要。-[UIDevice uniqueIdentifier]在iOS5实际在iOS5的时候已经被遗弃了,但是iOS7中已经完全的禁用了它。Xcode5甚至不会允许你编译包含了指引到-[UIDevice uniqueIdentifier]的app。此外,iOS7之前的使用了-[UIDevice uni...
分类:
移动开发 时间:
2015-04-29 11:50:51
阅读次数:
205
float?ver?=[[[UIDevice?currentDevice]?systemVersion]?floatValue];
????if(ver>=7.0)
????{
????????self.edgesForExtendedLayout?=UIRectEdgeNone;
????????self.automatica...
分类:
移动开发 时间:
2015-04-27 11:30:36
阅读次数:
147
1.info.plist文件 设置View controller-based status bar appearance的值为no
2.在AppDelegate.m中添加如下代码
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
[application setStatusBarStyle:UI...
分类:
移动开发 时间:
2015-04-15 14:54:13
阅读次数:
302
翻译:从iOS7及更高版本往后,如果你向ios设备请求获取mac地址,系统将返回一个固定值“02:00:00:00:00:00”,如果你需要识别设备的 唯一性,请使用UIDevice的identifierForVendor属性。(因广告目的而需要识别设备的应用,请考虑使用 ASIdentifierManager的advertisingIdentifier属性作为替代)
这个MAC地址是指...
分类:
移动开发 时间:
2015-04-15 11:26:25
阅读次数:
156
// IOS8 新系统需要使用新的代码咯
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings...
分类:
移动开发 时间:
2015-04-08 16:24:24
阅读次数:
139