斯坦福 IOS讲义 课件总结 三

时间:2014-07-14 22:11:08   收藏:0   阅读:409

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

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!