首页 > 移动平台 > 详细

斯坦福 IOS讲义 课件总结 三

时间:2014-07-14 22:11:08      阅读:408      评论:0      收藏:0      [点我收藏+]

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讲义 课件总结 三

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!