Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.3 KB

File metadata and controls

25 lines (19 loc) · 1.3 KB

1.Xcode自带头文件的路径 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks/UIKit.framework/Headers

2.修改了系统自带头文件后,Xcode会报错 解决方案:删掉下面文件夹的缓存即可(aplle是电脑的用户名) /Users/aplle/资源库/Developer/Xcode/DerivedData 或者 /Users/aplle/Library/Developer/Xcode/DerivedData

###awakeFromNib 当一个对象从xib或者storyboard中加载完毕后,就会调用一次 ###initWithCoder 从文件中解析一个对象的时候就会调用这个方法 ###initWithFrame 通过代码创建控件的时候就会调用 ###- (CGRect)titleRectForContentRect:(CGRect)contentRect 控制器内部label的frame,contentRect : 按钮自己的边框 ###- (CGRect)imageRectForContentRect:(CGRect)contentRect 控制器内部imageView的frame

###cell重用 当滚动列表时,部分UITableViewCell会移出窗口,UITableView会将窗口外的UITableViewCell放入一个对象池中,等待重用。当UITableView要求dataSource返回UITableViewCell时,dataSource会先查看这个对象池,如果池中有未使用的UITableViewCell,dataSource会用新的数据配置这个UITableViewCell,然后返回给UITableView,重新显示到窗口中,从而避免创建新对象