摘要: objective-c中,有类别可以在不修改源码的基础上增加方法 使用运行时库,必须要先引入 objc/runtime.h 可以使用的函数如下: OBJC_EXPORT void objc_setAssociatedObject(id object, const void *key, id valu 阅读全文
posted @ 2016-02-23 22:44 ryanzl 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 这个新特性,意味着View被Autolayout调整frame后,会自动拉伸和收缩SupView。 具体到Cell,要求cell.contentView的四条边都与内部元素有约束关系。 在TableViewController里 - (void)viewDidLoad { [super viewDi 阅读全文
posted @ 2016-02-23 21:39 ryanzl 阅读(296) 评论(0) 推荐(0) 编辑
摘要: @interface ThreadPreviewCell : UITableViewCell @property (nonatomic, strong) UILabel *titleLabel; @end @implementation ThreadPreviewCell - (void)layou 阅读全文
posted @ 2016-02-23 21:26 ryanzl 阅读(2273) 评论(0) 推荐(0) 编辑