ios关于frame等知识点的总结一
2015-08-13 07:34
281 查看
1.IBAction:
1> 能保证方法可以连线
2> 相当于void
2.IBOutlet:
1> 能保证属性可以连线
3.常见错误
setValue:forUndefinedKey:]: this class is notkey value coding
错误原因是:连线出问题了
4.Xcode5开始的一些建议
把用于连线的一些方法和属性声明在.m文件的类扩展中
5.frame\center\bounds
1> frame:能修改位置和尺寸
2> center:能修改位置
3> bounds:能修改尺寸(x\y一般都是0)
6.NSBundle
1> 一个NSBundle代表一个文件夹,利用NSBundle能访问对应的文件夹
2> 利用mainBundle就可以访问软件资源包中的任何资源
3> 模拟器应用程序的安装路径
/Users/aplle/资源库/Application Support/iPhone Simulator/7.1/Applications
7.UIImageView和UIButton
1> 使用场合
* UIImageView: 如果仅仅是显示图片,不需要监听图片的点击
* UIButton: 既要显示图片,又要监听图片的点击
2> 相同:能显示图片
3> 不同点
* UIButton能处理点击事件, UIImageView不能处理点击事件
* UIButton既能显示图片, 又能显示文字
* UIButton能同时显示两张图片
* UIButton继承自UIControl, 因此默认就能处理事件
* UIImageView继承自UIView, 因此默认就不能处理事件
8.Xcode文档安装路径
/Applications/Xcode.app/Contents/Developer/Documentation/DocSets
9.Xcode模拟器安装路径
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
1> 能保证方法可以连线
2> 相当于void
2.IBOutlet:
1> 能保证属性可以连线
3.常见错误
setValue:forUndefinedKey:]: this class is notkey value coding
错误原因是:连线出问题了
4.Xcode5开始的一些建议
把用于连线的一些方法和属性声明在.m文件的类扩展中
5.frame\center\bounds
1> frame:能修改位置和尺寸
2> center:能修改位置
3> bounds:能修改尺寸(x\y一般都是0)
6.NSBundle
1> 一个NSBundle代表一个文件夹,利用NSBundle能访问对应的文件夹
2> 利用mainBundle就可以访问软件资源包中的任何资源
3> 模拟器应用程序的安装路径
/Users/aplle/资源库/Application Support/iPhone Simulator/7.1/Applications
7.UIImageView和UIButton
1> 使用场合
* UIImageView: 如果仅仅是显示图片,不需要监听图片的点击
* UIButton: 既要显示图片,又要监听图片的点击
2> 相同:能显示图片
3> 不同点
* UIButton能处理点击事件, UIImageView不能处理点击事件
* UIButton既能显示图片, 又能显示文字
* UIButton能同时显示两张图片
* UIButton继承自UIControl, 因此默认就能处理事件
* UIImageView继承自UIView, 因此默认就不能处理事件
8.Xcode文档安装路径
/Applications/Xcode.app/Contents/Developer/Documentation/DocSets
9.Xcode模拟器安装路径
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
相关文章推荐
- IOS——TableView 中利用Item模型进行 Cell 的开发(1)TableView 篇
- iOS设计模式---备忘录模式
- iOS 利用pod_trunk发布程序
- iOS开发学习之自定义cell
- OC_Memory_内存管理原理
- 3.ios-NSarray下
- iostream.h和iostream 区别
- iOS笔记 Block和内存管理
- iOS Tips(持续更新)
- 【分享】自学 iOS 开发的一些经验
- ios的两种传值方式
- iOS应用内付费(IAP)开发步骤列表
- iOS开发如何提高
- IOS--cell不出图解决方法
- IOS 秒数转换为天数和小时数
- iOS SDK:iOS调试技巧
- iOS 关于tableView cell的分割线的一些设置
- iOS中的内存管理1
- iOS GCD浅析
- iOS中读取文件夹下所有文本的行数