斯坦福 IOS讲义 课件总结 三
2024-10-15 08:04:05
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]
最新文章
- Android官方文档
- CI模板加载css和js
- 安卓app中嵌入一个H5页面,当手机系统设置字体变大时,如何使H5页面的字体不会随用户自己调整的系统字体变化而变化?
- Spring 学习笔记 7. 尚硅谷_佟刚_Spring_Bean 的作用域
- UVa1161 Objective: Berlin(最大流)
- git常见问题解决办法
- linux(Ubuntu)安装QQ2013
- 面向对象的JavaScript系列一,创建对象
- [转] Android自动化测试之MonkeyRunner录制和回放脚本(四)
- GCD 单例
- C# 课堂总结5-数组
- ios 字体设计
- JAVA中StringBuffer类常用方法
- python之Character string
- python崩溃到现在居然还没有放弃的Day07
- /lib/lsb/init-functions
- 用css解决table文字溢出控制td显示字数
- codeforces 1042 e
- 空间谱专题13:联合解算DOA(ML/AP)
- 1.0 poi单元格合合并及写入
热门文章
- Codeforces Round #277.5 (Div. 2)-D
- ORACLE恢复误删除的对象(表、存储过程等)
- windows下设置/删除Tomcat的开机自启动
- BZOJ 3110: [Zjoi2013]K大数查询( 树状数组套主席树 )
- IO之读入文件
- 公选网站作业4_2.php
- 星际反作弊2.3for-win7-xp-win8-win10
- python 常用模块及方法
- 关于 overridePendingTransition()使用
- Windows Azure Camp---漫步云端,创意无限