- 浏览: 258960 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (174)
- android (5)
- android代码片段 (10)
- ios (102)
- 程序员 (5)
- 人生 (1)
- UITextField (2)
- UINavigationController (2)
- iPhone开发 (87)
- cocos2d (8)
- Object-c (1)
- Xcode4 (4)
- Mac (1)
- ASIHTTPRequest (1)
- UITableView (9)
- UIImageView (2)
- CATransition (1)
- CCMenu (1)
- UIView (2)
- UIScrollView (1)
- NSString (1)
- Git (2)
- UISwitch (1)
- UIImage (1)
- 拉伸 (1)
- delegate (1)
- NSTimer (1)
- Crash (1)
- Log (1)
- TabBar (1)
- UITabBarController (1)
- UITextView (1)
- iPad (1)
- app (1)
- test (1)
- 数据库 (1)
最新评论
-
cccoooccooco:
测了下,效率很高啊。谢谢分享。
字符串替换算法【java】 -
zkai309:
你好,
我们是ios手游《富豪传奇》的开发商,你开发的糗事囧 ...
如何判断自己是否到了该辞职的时候 -
xyxdasnjss:
<div class="quote_title ...
设备判断 iphone3? iphone4? iphone5? -
吃饱了就饿:
以后会用到
设备判断 iphone3? iphone4? iphone5? -
xyxdasnjss:
zhihaoshi 写道ios 5.0 中用什么方法判断 iO ...
ios 判断设备的GPS功能是否开启
//.h #import <Foundation/Foundation.h> #import <sys/utsname.h> @interface DeviceInfo : NSObject +(NSString*)deviceString; +(BOOL)isRetina; @end //.m #import "DeviceInfo.h" @implementation DeviceInfo +(NSString*)deviceString { struct utsname systemInfo; uname(&systemInfo); NSString *deviceString = [NSStringstringWithCString:systemInfo.machineencoding:NSUTF8StringEncoding]; if ([deviceString isEqualToString:@"iPhone1,1"]) return @"iPhone 1G"; if ([deviceString isEqualToString:@"iPhone1,2"]) return @"iPhone 3G"; if ([deviceString isEqualToString:@"iPhone2,1"]) return @"iPhone 3GS"; if ([deviceString isEqualToString:@"iPhone3,1"]) return @"iPhone 4"; if ([deviceString isEqualToString:@"iPhone3,2"]) return@"Verizon iPhone 4"; if ([deviceString isEqualToString:@"iPod1,1"]) return @"iPod Touch 1G"; if ([deviceString isEqualToString:@"iPod2,1"]) return @"iPod Touch 2G"; if ([deviceString isEqualToString:@"iPod3,1"]) return @"iPod Touch 3G"; if ([deviceString isEqualToString:@"iPod4,1"]) return @"iPod Touch 4G"; if ([deviceString isEqualToString:@"iPad1,1"]) return @"iPad"; if ([deviceString isEqualToString:@"iPad2,1"]) return @"iPad 2 (WiFi)"; if ([deviceString isEqualToString:@"iPad2,2"]) return @"iPad 2 (GSM)"; if ([deviceString isEqualToString:@"iPad2,3"]) return @"iPad 2 (CDMA)"; if ([deviceString isEqualToString:@"i386"]) return @"Simulator"; if ([deviceString isEqualToString:@"x86_64"]) return @"Simulator"; return deviceString; } +(BOOL)isRetina { struct utsname systemInfo; uname(&systemInfo); NSString *deviceString = [NSStringstringWithCString:systemInfo.machineencoding:NSUTF8StringEncoding]; if ([deviceString isEqualToString:@"iPhone1,1"]) return NO; if ([deviceString isEqualToString:@"iPhone1,2"]) return NO; if ([deviceString isEqualToString:@"iPhone2,1"]) return NO; if ([deviceString isEqualToString:@"iPhone3,1"]) return YES; if ([deviceString isEqualToString:@"iPhone3,2"]) return YES; if ([deviceString isEqualToString:@"iPod1,1"]) return NO; if ([deviceString isEqualToString:@"iPod2,1"]) return NO; if ([deviceString isEqualToString:@"iPod3,1"]) return NO; if ([deviceString isEqualToString:@"iPod4,1"]) return YES; if ([deviceString isEqualToString:@"iPad1,1"]) return YES; if ([deviceString isEqualToString:@"iPad2,1"]) return YES; if ([deviceString isEqualToString:@"iPad2,2"]) return YES; if ([deviceString isEqualToString:@"iPad2,3"]) return YES; if ([deviceString isEqualToString:@"i386"]) return NO; if ([deviceString isEqualToString:@"x86_64"]) return NO; returnNO; // return deviceString; } @end + (NSString*)deviceString { // 需要#import "sys/utsname.h" struct utsname systemInfo; uname(&systemInfo); NSString *deviceString = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; if ([deviceString isEqualToString:@"iPhone1,1"]) return @"iPhone 1G"; if ([deviceString isEqualToString:@"iPhone1,2"]) return @"iPhone 3G"; if ([deviceString isEqualToString:@"iPhone2,1"]) return @"iPhone 3GS"; if ([deviceString isEqualToString:@"iPhone3,1"]) return @"iPhone 4"; if ([deviceString isEqualToString:@"iPhone4,1"]) return @"iPhone 4S"; if ([deviceString isEqualToString:@"iPhone5,2"]) return @"iPhone 5"; if ([deviceString isEqualToString:@"iPhone3,2"]) return @"Verizon iPhone 4"; if ([deviceString isEqualToString:@"iPod1,1"]) return @"iPod Touch 1G"; if ([deviceString isEqualToString:@"iPod2,1"]) return @"iPod Touch 2G"; if ([deviceString isEqualToString:@"iPod3,1"]) return @"iPod Touch 3G"; if ([deviceString isEqualToString:@"iPod4,1"]) return @"iPod Touch 4G"; if ([deviceString isEqualToString:@"iPad1,1"]) return @"iPad"; if ([deviceString isEqualToString:@"iPad2,1"]) return @"iPad 2 (WiFi)"; if ([deviceString isEqualToString:@"iPad2,2"]) return @"iPad 2 (GSM)"; if ([deviceString isEqualToString:@"iPad2,3"]) return @"iPad 2 (CDMA)"; if ([deviceString isEqualToString:@"i386"]) return @"Simulator"; if ([deviceString isEqualToString:@"x86_64"]) return @"Simulator"; NSLog(@"NOTE: Unknown device type: %@", deviceString); return deviceString; }
发表评论
-
iOS 关闭键盘 3种方式
2015-12-11 14:21 8401,明确知道 当前的UITextField,或者UITextV ... -
在webapp中判断native app是否安装并直接打开
2015-08-31 18:15 886http://www.baidufe.com/item/cc5 ... -
iOS之ARC下的Block
2015-04-15 14:37 651http://www.cnblogs.com/tekkama ... -
UITableView 隐藏多余的Cell的分割线
2015-02-02 14:39 1607- (void)setExtraCellLineHidden ... -
UILabel顶端对齐
2014-09-10 10:15 773http://shfzhzhr.iteye.com/blog ... -
iOS7滑动返回
2014-06-24 11:48 968http://blog.csdn.net/wmqi10/ar ... -
UIView (Additon)
2014-06-19 22:23 829#import <UIKit/UIKit.h> ... -
UIColor (XYCategory)
2014-06-19 22:13 548#import <UIKit/UIKit.h> ... -
OC MD5
2014-06-19 21:50 835#import <Foundation/Foundat ... -
IOS判断设备是否已越狱(isJailbroken)
2014-06-03 21:17 748@interface UIDevice (Helper) ... -
iOS6 Xcode5 去掉Icon高亮
2014-05-25 11:13 0我昨天刚遇到这个问题,已经解决。请按照下图红色矩形所圈处的信 ... -
iOS使用NSClassFromString
2014-03-07 11:24 973http://www.cocoachina.com/b/?p ... -
iOS7 开发相关
2013-10-22 10:17 12671.UITableView reloadData 之 ... -
iPad横版开发时,宽高是反的
2013-08-14 18:01 1130最近刚开始做iPad版应用,但发现横版的时候宽高是反的,很别 ... -
UITextView 带有PlaceHolder
2013-07-31 13:23 1500#import <UIKit/UIKit.h> ... -
UITableView 只更新某行
2013-07-22 10:10 1065如果全部更新的话 用reloadData方法 如果 ... -
Xcode 4.4中LLVM compiler 4.0带来的Objective-C新语法特性
2013-07-15 10:56 951http://blog.csdn.net/totogo201 ... -
new 与 alloc/init的区别
2013-07-11 14:47 768http://blog.csdn.net/abby_shee ... -
自定义UITableViewCell上的delete按钮
2013-06-28 10:35 1117//通过UITableViewDelegate方法可以实现删 ... -
判断是否是 emoji表情
2013-06-28 09:42 2424+ (BOOL)stringContainsEmoji:(N ...
相关推荐
爱思SHSH是针对苹果设备,特别是iPhone 3GS(型号为iPhone3,1, iPhone3,2和iPhone3,3)的一种重要工具,用于备份和恢复固件。SHSH,全称为“System Hash SHared”,是Apple设备的ECID(唯一设备标识符)与特定iOS...
iphone3,1 shsh iphone4 5.1.1iphone3,1 shsh iphone4 5.1.1
苹果手机iPhone3,1_SHSH 降级软件
iphone3,2shsh6.1.2降级 刷机 越狱
iPhone3,1_7.1.2
iPhone3,1_SHSH_6.1.3(10B329).i4
iPhone3,2是iPhone 4S的一个硬件版本,而6.0.1是该设备可运行的一个特定iOS版本。 SHSH备份的重要性在于,它允许用户在未来苹果停止对某个iOS版本签名服务后,仍然能够降级到该版本。例如,如果你有一份iPhone3,2的...
iphone3,2 6.1.3-10B329,shsh
iPhone3,2_SHSH_6.1.3
SHSH Blobs iPhone 4 8GB internacional.
《iPhone3开发基础教程》是针对初学者的一本详尽指南,旨在引领读者探索iPhone SDK,深入了解iPhone和iPod touch编程。本书由Dave Mark与Jeff LaMarche共同编写,为第三版更新修订版,专为iOS开发新手设计,涵盖了...
标题 "iPhone3,1_SHSH_6.1.3(10B329).rar" 和描述中的信息,明显与苹果公司的iPhone设备以及iOS操作系统有关。这里的"SHSH"代表"System Software SHAttered SHadow",是Apple用于验证设备固件升级的一种安全机制。在...
iPhone3,1_SHSH_6.1.2(10B146)_000001080018F5F4.SHSH
由于iPhone的特性,它并不直接支持CMWAP接入,但通过特定设置和技巧,我们仍可以使iPhone 3系列设备顺利接入并使用CMWAP网络。 首先,我们需要理解CMWAP和CMNET的区别。CMNET是全面的互联网接入服务,而CMWAP则主要...
iPhone3,2_SHSH_6.1.3(10B329)_0000004F1F0EA50E.shsh
iPhone3开发基础教程(高清扫描版,扫描后的图片格式已经被转换成文字格式)由于文件太大,分割上传(共5部分)。 解压方式:打开Terminal,使用cat语句合并文件,语法: cat filename.01 filename.02 ... filename.20...
iPhone3开发基础教程(高清扫描版,扫描后的图片格式已经被转换成文字格式)由于文件太大,分割上传(共5部分)。 解压方式:打开Terminal,使用cat语句合并文件,语法: cat filename.01 filename.02 ... filename.20...
iPhone3DAlbumExperience
iPhone3,1shsh 是针对iPhone4刷机用途,刷机请慎重
刷iPhone4用的iPhone3,1_SHSH_6.1 iPhone3,1_SHSH_6.1(10B144)_000002F1E91CE52C.i4