会员
众包
新闻
博问
闪存
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
小楼一夜听春雨
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
11
12
13
14
15
16
17
18
19
···
25
下一页
2016年3月2日
Objective c, +load, +initialize 方法
摘要: +load() 当类被加载入程序的时候会执行+load方法 +initialize() 当类第一次被使用的时候会执行+initialize方法 这两个方法都只会被执行一次。
阅读全文
posted @ 2016-03-02 09:30 ximenchuixie
阅读(133)
评论(0)
推荐(0)
编辑
2016年2月21日
objective c, category 和 protocol 中添加property
摘要: property的本质是实例变量 + getter 和 setter 方法 category和protocol可以添加方法 category 和 protocol中可以添加@property 关键字 所以,在protocol中添加property时,其实就是添加了 getter 和 setter 方
阅读全文
posted @ 2016-02-21 00:42 ximenchuixie
阅读(772)
评论(0)
推荐(0)
编辑
objective c, protocol
摘要: OC中协议类似于java中的接口,在多个类具有类似的方法时可以将这些方法定义到protocol中,然后各个类分别实现protocol中的各个方法。 例:有两个类Square和Circle, 定义一个protocol来获得对象的面积, Square和Circle只需实现protocol中的-(int)
阅读全文
posted @ 2016-02-21 00:30 ximenchuixie
阅读(108)
评论(0)
推荐(0)
编辑
2016年1月31日
ARC
摘要: I Writing ARC code 1. Don’t call Retain, release, autorelease dealloc, unless you need to release CF objects or remove observers, remove [super deallo
阅读全文
posted @ 2016-01-31 00:40 ximenchuixie
阅读(176)
评论(0)
推荐(0)
编辑
2016年1月19日
objective c,copy, mutableCopy区别
摘要: copy总是返回不能被修改的对象,mutableCopy返回可以被修改的对象例:NSArray *array = @[@"test", @"test2"];NSMutableArray *arrayMu = [array copy];// arrayMu实际上被赋值成一个 NSArray 对象,这是...
阅读全文
posted @ 2016-01-19 21:52 ximenchuixie
阅读(206)
评论(0)
推荐(0)
编辑
2015年12月7日
ipad或iPhone 访问https网站不成功
摘要: 可能的原因是设备的日期不对,将设备日期调整正确即可解决
阅读全文
posted @ 2015-12-07 14:48 ximenchuixie
阅读(739)
评论(0)
推荐(0)
编辑
2015年11月2日
iOS 真机调试 Xcode 显示 device Error: device unavailable
摘要: 一般来说有两个原因:1. iphone没有加到test device里,将iphone的设备id加到test device列表里2. Xcode不支持当前的iOS版本,将Xcode升级到最新版
阅读全文
posted @ 2015-11-02 15:50 ximenchuixie
阅读(2106)
评论(0)
推荐(0)
编辑
2015年9月9日
iOS toll-free bridge
摘要: https://developer.apple.com/library/ios/documentation/CoreFoundation/Conceptual/CFDesignConcepts/Articles/tollFreeBridgedTypes.htmltoll-free bridge本质上...
阅读全文
posted @ 2015-09-09 16:58 ximenchuixie
阅读(296)
评论(0)
推荐(0)
编辑
const 用法
摘要: static NSString * const testString = @"google"; //表示testString这个指针不能被修改,如若对testString赋值则会报错:testString = @"hello";编译器会报错staticNSStringconst*testString...
阅读全文
posted @ 2015-09-09 14:34 ximenchuixie
阅读(157)
评论(0)
推荐(0)
编辑
ios 给图片加文字
摘要: - (UIImage*) drawText:(NSString*)text inImage:(UIImage*)image{ //prepare image context UIGraphicsBeginImageContext(image.size); //draw image, (画图片)...
阅读全文
posted @ 2015-09-09 14:05 ximenchuixie
阅读(234)
评论(0)
推荐(0)
编辑
上一页
1
···
11
12
13
14
15
16
17
18
19
···
25
下一页