UI基础01

来源:互联网 发布:java邮件代发 编辑:程序博客网 时间:2024/06/06 12:37
1.IBAction:
1>能保证方法可以连线
2>相当于void

2.IBOutlet:
1>能保证属性可以连线

3.常见错误
setValue:forUndefinedKey:]: this class is not key value coding
错误原因是:连线出问题了

4.Xcode5开始的一些建议
把用于连线的一些方法和属性声明在.m文件的类扩展中

5.frame\center\bounds
1> frame:能修改位置和尺寸
2> center:能修改位置
3> bounds:能修改尺寸(x\y一般都是0)
0 0