随笔分类 -  Objective C

摘要:// 九宫格 #import "ViewController.h"@interface ViewController ()@property (nonatomic ,strong) NSArray *apps;@end@implementation ViewController- (void)vie... 阅读全文
posted @ 2015-02-04 17:16 jerry1209 阅读(148) 评论(0) 推荐(0)
摘要:// 重写 init方法当对象创建时我们通常想给对象给一定固定值,那么这时可以重写init// People类 1 #import 2 // 性别 3 typedef enum { 4 SexMan, 5 SexWoman, 6 } Sex; 7 8 @interface Peo... 阅读全文
posted @ 2015-01-23 01:49 jerry1209 阅读(373) 评论(0) 推荐(0)
摘要:1. 谁 alloc ,谁 release;2. 谁要占用谁retain;3. 谁不想占用对象时就 让对象计数器release;4.谁 retain,谁release; 1 // Book类 2 @interface Book:NSObject 3 4 { 5 6 int _pric... 阅读全文
posted @ 2015-01-23 01:31 jerry1209 阅读(124) 评论(0) 推荐(0)