09 2018 档案

iOS UILabel计算宽度和高度
摘要:1、根据文本计算size,这里需要传入attributes UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, 100, 0, 0)]; label.text = @"12331afaa我是谁的谁"; label.textCo 阅读全文

posted @ 2018-09-21 17:46 7890陈 阅读(351) 评论(0) 推荐(0)

iOS 常用的宏
摘要:/* 屏幕宽高 */ #define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width) #define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height) /* 打印日志 阅读全文

posted @ 2018-09-20 10:07 7890陈 阅读(111) 评论(0) 推荐(0)

iOS 关联对象(Associated Object)
摘要:1、category需要添加属性,可以使用关联对象来扩展对象 objc_setAssociatedObject(id _Nonnull object, const void * _Nonnull key, id _Nullable value, objc_AssociationPolicy poli 阅读全文

posted @ 2018-09-19 17:02 7890陈 阅读(170) 评论(0) 推荐(0)

导航