ios基础知识阅读
qq469236803
这个作者很懒,什么都没留下…
展开
-
nil / Nil / NULL / NSNull
其实很简单:nil 空对象,Nil 空类,NULL c中的空指针,NSNull 是一个单利的类方法,[NSNull null]可以放到集合类型的变量里面,代表一个空值。 参考: nil / Nil / NULL / NSNull Written by Mattt Thompson — January 7th, 2013 Symbol Value转载 2015-07-14 11:30:24 · 371 阅读 · 0 评论 -
在IOS应用中打开另外一个应用的解决方案
最近要在IOS中实现一个应用启动另外一个应用的功能,搜了一些资料,使用UIApplication的openURL:的方法就能实现,现在整理和大家分享一下! 注册自定义URL协议 首先被启动的应用需要向iPhone注册一个自定义URL协议。这是在你的项目文件夹的info.plist文件进行的(就是你改变应用程序图标的同一个文件)。 Step1. 右键,选择“Add Row”Step2. K转载 2013-07-17 17:04:45 · 791 阅读 · 0 评论 -
iOS开发之发送邮件
http://www.istar.name/blog/ios-send-email 1. 添加MessageUI.framework 2. 在头文件中引用并添加委托 #import #import @interface LoginViewController : UIViewController @end转载 2013-07-22 22:54:36 · 1272 阅读 · 0 评论 -
iOS 获取手机的型号,系统版本,软件名称,软件版本
http://blog.csdn.net/jmulxg/article/details/8200532 //手机序列号 NSString* identifierNumber = [[UIDevice currentDevice] uniqueIdentifier]; NSLog(@"手机序列号: %@",identifierNumber);转载 2013-07-22 11:20:47 · 614 阅读 · 0 评论 -
How to sort an NSMutableArray with custom objects in it?
碰到了个问题,谷歌了一下,觉得这个回答,回答的真好,因此在这里记录一下。 http://stackoverflow.com/questions/805547/how-to-sort-an-nsmutablearray-with-custom-objects-in-it How to sort an NSMutableArray with custom objects i转载 2013-06-12 21:15:41 · 1219 阅读 · 0 评论 -
触屏手机点击区域的小秘密
科普一下,竟然不知道。 http://www.yixieshi.com/ucd/10418.html转载 2013-06-11 20:44:21 · 822 阅读 · 0 评论 -
iOS开发常用的宏 大家一起来收集~
收集的过程,也是学习的过程 iOS开发常用的宏 大家一起来收集~ #define NavigationBar_HEIGHT 44 #define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) #define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.hei转载 2013-04-03 11:25:24 · 613 阅读 · 0 评论 -
iOS App Programming Guide 官方文档
iOS App Programming Guide http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/Introduction/Introduction.html转载 2013-04-07 17:34:17 · 765 阅读 · 0 评论 -
Start Developing iOS Apps Today
http://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/chapters/Introduction.html 是不是可以跟着走一遍?转载 2013-04-07 17:33:06 · 554 阅读 · 0 评论 -
有用的小代码
有用的小代码 CocoaChina2013(春季)开发者大会报名开启! 本帖属于CocoaChina会员发表,转帖请写明来源和帖子地址 常用代码整理: 12.判断邮箱格式是否正确的代码: //利用正则表达式验证 -(BOOL)isValidateEmail:(NSString *)email { NSString *em转载 2013-04-10 09:31:39 · 752 阅读 · 0 评论 -
iOS开发是否应该使用ARC?
iOS开发是否应该使用ARC? 和身边做iOS开发的同事组建了一个QQ群,每隔一段时间,大家就会讨论是否应该使用ARC。所以我觉得有必要将这些讨论分享出来,让大家消除对于ARC的疑虑。 关于ARC的介绍文章网上已经很多,苹果的官方文档也不少。担心使用ARC会带来问题的同学主要的理由有以下5点: 1.担心这个技术方案不靠谱。苹果大多数时候的技术方案都是比较靠谱的,但也有一些技术方案有很多坑,例转载 2013-04-10 09:38:12 · 627 阅读 · 0 评论 -
release 和 drain
release 和 drain 分类: Object-c2011-12-27 20:14 270人阅读 评论(1) 收藏 举报 triggersreference drain: [html] view plaincopy span style="font-size:18px;">In a reference-coun转载 2013-04-09 10:33:18 · 726 阅读 · 0 评论 -
objective-c没有类静态成员变量
http://www.cocoachina.com/bbs/simple/index.php?t3312.html kyle 2009-04-05 17:09 和c++一样,objective c中静态变量使用static关键字进行定义。例如:static NSUInteger n; 需要注意的是该static变量的作用域,它的作用域是在定义该变量的.转载 2013-04-07 15:24:34 · 1287 阅读 · 0 评论 -
资源路径获取方式
//应用程序包中的资源路径获取方式 NSString *path=[[NSBundle mainBundle] pathForResource:@"iphone_skin" ofType:@"png"]; NSLog(@"%@",path); //获取沙盒当中的路径获取方式 NSArray *paths=NSSearchPathFor原创 2013-03-22 13:51:27 · 851 阅读 · 0 评论 -
我最爱正则
需要用到正则,以前用过,用了就忘,搜索了一下, 找到段代码,试了一下。地下备注这段是自己写的,原来,可以被一句话给代替.那一句话,就是地下的那句话。 NSMutableString *sch = [NSMutableString stringWithString:@"中文 标题1title 语言 标题2title "]; NSError *err; NSSt原创 2013-03-22 09:32:29 · 853 阅读 · 0 评论 -
NSDictionary读plist文件顺序问题
怎么我的字典这么杂乱无章?原来字典本来就是无序的,杂凑的。 我的办法是,给我的key前面加个数字,然后给字典排序。 NSDictionary读plist文件顺序问题 Filed Under (iPad) by CouldHll on 14-02-2011 Tagged Under : iOS, iPad 问题描述: 这些天在做AD,N转载 2013-03-19 22:11:34 · 2654 阅读 · 0 评论 -
iOS开发经验谈:如何提高应用开发效率?
iOS开发经验谈:如何提高应用开发效率? 发表于2013-07-26 14:30| 1852次阅读| 来源Mobiletuts+| 6 条评论| 作者Bart Jacobs 移动开发iOS开发经验Xcode 摘要:在应用开发过程中,有太多繁杂的事务需要开发者解决。如何对开发流程进行改善或使其自动化,从而提高效率?这成为许多开发者共同探讨的命题。是熟记常用快捷键、学习G转载 2013-07-27 20:58:18 · 798 阅读 · 0 评论 -
NSString属性声明中的copy和retain区别
NSString属性声明中的copy和retain区别 http://www.cnblogs.com/celestial/archive/2012/10/12/2721244.html NSString属性声明中的copy和retain区别 前几天去面试,被问到了NSString属性声明中的copy和retain具体区别,对内存计数的影响,汗,当时没整明白,也转载 2013-08-04 04:59:45 · 436 阅读 · 0 评论 -
Apple移动设备处理器指令集 armv6、armv7、armv7s及arm64
Apple移动设备处理器指令集 armv6、armv7、armv7s及arm64转载 2015-07-07 10:43:43 · 712 阅读 · 0 评论 -
nil / Nil / NULL / NSNull
nil / Nil / NULL / NSNull转载 2015-03-30 00:18:16 · 347 阅读 · 0 评论 -
Objective-C对象模型及应用
Objective-C对象模型及应用转载 2015-03-03 10:12:35 · 418 阅读 · 0 评论 -
Rotate a UIImage by 90 degree angles
setCurrentPage转载 2014-07-13 15:07:36 · 758 阅读 · 0 评论 -
Why my UIScreen mainScreen bounds size return 480
Why my UIScreen mainScreen bounds size return 480 in ios6 8down vote You have to add the iPhone 5 Launch image (Default-568h@2x.png) to your project. The 568 point t转载 2014-07-28 17:22:35 · 559 阅读 · 0 评论 -
哈哈,做题了
10. int n = 0; while (n++) { if (n>3) { break; } } 请问n结果是多少? A.0 B.1 C.2 D.3 错误 应该选择:B.1原创 2014-05-24 23:50:14 · 1517 阅读 · 0 评论 -
xcode 设备列表没有显示
XCode设备列表没有设备,搞了半天,不幸被言中了,囧,Deployment Target 设置成7.0,怎么会识别6.0的老设备啊。难怪别的工程可以识别,唯独这个demo工程识别不了。 其实最大的可能是:你项目支持的最低版本号比你设备的版本高 例如你项目最低支持5.1 而你的设备是5.0.1,那么无论如何都不可能有反应原创 2014-03-17 15:53:48 · 2035 阅读 · 0 评论 -
Searching Arrays With NSPredicate and Blocks
Searching Arrays With NSPredicate and Blocks OCT 19TH, 2010 In researching a change I wanted to make to the example RSS Reader app that I have working on for this blog I started looking at the转载 2014-02-26 17:27:48 · 676 阅读 · 0 评论 -
makeObjectsPerformSelector 方法的用法
makeObjectsPerformSelector 方法的用法 nsarray 类定义的方法 1. makeObjectsPerformSelector:@select(aMethod) 简介:让数组中的每个元素 都调用 aMethod 2. makeObjectsPerformSelector:@select(aMethod)转载 2014-02-24 11:36:35 · 1575 阅读 · 0 评论 -
JavaScriptCore and iOS 7
JavaScriptCore and iOS 7 JavaScriptCore and iOS 7 AUTHOR: OWEN MATHEWS Tweet As a rule, iOS programmers don’t think much about JavaScript. We spend our days swimming inC and转载 2013-12-17 11:51:28 · 1202 阅读 · 0 评论 -
如何判断UIScrollView滑动方向
碰到了问题,搜了一下,搞定,方法不错,很巧 Finding the direction of scrolling in a UIScrollView? 当然,这么写也行 - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ //Selected index's color changed. static f原创 2013-11-21 18:14:45 · 1505 阅读 · 0 评论 -
objective-c中的@synchronized用法
看到项目代码里面,有这个,搜索了一下,原来是这么回事。 你是否在一些源代码中看到过如下语句: @synchronized(anobj) { //操作语句 } 如果你有过C#.net的开发你可能会见过这个: lock(obj) { //操作语句 } 用来控制多线程同步解决方案,保证此时没有其他线程对anobj对象进行修改 下面是国外一论坛原文: Using t转载 2013-10-08 13:01:49 · 2530 阅读 · 0 评论 -
ios 7 唯一标识的问题
转载自 http://blog.sina.com.cn/s/blog_8c7c56230101ny1z.html ios7的mac地址问题 (2013-09-16 23:23:36) 在iOS5以前,可以使用udid作为iOS设备的唯一标示符,但是到了iOS6的时候,udid被苹果给禁止了,后来大家都使用mac地址来作为设备的唯一标识符,但是苦逼的程序员转载 2013-10-08 09:44:37 · 1318 阅读 · 0 评论 -
What are XIB files?
http://speirs.org/blog/2007/12/5/what-are-xib-files.html What are XIB files? The Xcode tools in Leopard introduced a new file format for user interfaces. In the brach of th转载 2013-09-02 15:38:35 · 1383 阅读 · 0 评论 -
ios开发之--判断当前设备的类型
http://hi.baidu.com/myyuchong/item/77f2f750a9e9553433e0a985 ios开发之--判断当前设备的类型 + (NSString*)getDeviceVersion { size_t size; sysctlbyname("hw.machine",NULL, &siz转载 2013-08-15 14:13:07 · 1838 阅读 · 0 评论 -
搞定ios静态库
说来惭愧,搞ios这么久了,一直没玩过静态库,现在就来试一试。之前试过几次没有成功,这次一定要一举拿下。 http://www.xuanyusong.com/archives/606 IOS研究院之使用Xcode4制作静态库详解(五) 看了这篇文章,觉得挺简单的啊,看完了,自己开始尝试,碰到个问题,不管怎么着,我的.a文件始终都是红色的,好像上次,就卡在这一步,没往下走,继续原创 2013-03-14 17:02:43 · 859 阅读 · 0 评论 -
适配 ios6
http://renxiangzyq.iteye.com/blog/1682679 http://www.cocoachina.com/bbs/read.php?tid=116442原创 2013-01-15 10:10:33 · 651 阅读 · 0 评论 -
Objective-C中一种消息处理方法performSelector withObject
http://www.cnblogs.com/buro79xxd/archive/2012/04/10/2440074.html [[MethodForSelectors alloc] performSelector:customSelector withObject:0]; 这句话应该是有问题的。也懒得验证,反正到时候编译器会报错的。 - (void) perfor转载 2012-09-05 19:35:27 · 1142 阅读 · 0 评论 -
View的layer属性设置
View的layer属性设置 #import //导入框架 self.aView.layer setCornerRadius:8.0];//倒角 self.aView.layer setShadowColor:[[UIColor blackColor]CGColor]];//阴影颜色 self.aView.layer setShadowOffset:CGSizeMake(10, 10转载 2012-09-21 15:55:33 · 719 阅读 · 0 评论 -
收集了一些iOS技术面试题,试试你能通过吗?
收集了一些iOS技术面试题,试试你能通过吗? 以前也看到过这个,自己还试着作答,先贴上来. 1.Difference between shallow copy and deep copy? 答:看了书的351页大概明白了,不过356页还是木有看懂 Foundation类实现了copy和mutableCopy方法,默认执行浅拷贝。 shadow copy:创建对象引用的副本。 deep原创 2012-09-20 17:07:27 · 678 阅读 · 0 评论 -
NSString+NSMutableString+NSValue+NSAraay用法汇总
NSString+NSMutableString+NSValue+NSAraay用法汇总 太长了,看到第二页了。 //3、在以上方法中,提升速度:initWithString方法 NSString *astring = [[NSString alloc] initWithString:@"This is a String!"]; NSLog(@"astrin转载 2012-09-08 23:24:18 · 421 阅读 · 0 评论 -
[iOS] iOS 6的Rotation
http://blog.csdn.net/totogogo/article/details/8002173 大概溜了一眼,这一块用到再说吧。 [iOS] iOS 6的Rotation转载 2012-09-23 07:56:28 · 504 阅读 · 0 评论