码迷,mamicode.com
首页 > 移动开发 > 详细

斯坦福 IOS讲义 课件总结 三

时间:2014-07-14 22:10:48      阅读:389      评论:0      收藏:0      [点我收藏+]

标签:strong   os   for   io   cti   re   

1,@property (nonatomic,readwrite)NSInteger score;注意这里有一个只读和只写的属性,readonly.

2,重写初始化方法也可以改名字和传参数,(改名一般以initWith开头),

-(instancetype) initWithCardCount:(NSUImteger)count usingDeck:(Deck *) deck;

3,输出控件数组。

@property (strong,nonatomic)IBOutletCollection(UIButton)NSArray *cardButtons;

方法里面可以用for(UIButton* cardButton in self.cardButtons 来控制控件。

4,操作数组基本函数,- (void)addObject:(id)anObject;

- (void)insertObject:(id)anObject atIndex:(int)index;

- (void)removeObjectAtIndex:(int)index; Usually created with [[NSMutableArray alloc] init] 

斯坦福 IOS讲义 课件总结 三,布布扣,bubuko.com

斯坦福 IOS讲义 课件总结 三

标签:strong   os   for   io   cti   re   

原文地址:http://www.cnblogs.com/guanliyang/p/3842477.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!