- (void)drawInRect:(CGRect)rect withAttributes:(NSDictionary *)attrs;使用
来源:互联网 发布:苏州软件行业协会 编辑:程序博客网 时间:2024/04/30 10:23
- (void)drawInRect:(CGRect)rect withAttributes:(NSDictionary *)attrs;
这个方法是ios7.0以后才能用的,如果程序支持ios7.0一下,需要判断手机系统版本,用各自的方法
- (CGSize)drawInRect:(CGRect)rect withFont:(UIFont *)font lineBreakMode:(NSLineBreakMode)lineBreakMode alignment:(NSTextAlignment)alignment;
旧方法直接在参数中设置绘制文字的属性,新方法是放到字典attrs中;
关于字典attrs 下面的链接非常详细
iOS- 详解文本属性Attributes:http://www.cnblogs.com/qingche/p/3574995.html
可以参考对文本属性进行设置;
0 0
- - (void)drawInRect:(CGRect)rect withAttributes:(NSDictionary *)attrs;使用
- - (void)drawInRect:(CGRect)rect withAttributes:(NSDictionary *)attrs;使用
- 新方法drawInRect:withAttributes的使用
- - (void)drawRect:(CGRect)rect
- 关于drawInRect: withAttributes: 等新方法的使用
- 关于drawInRect: withAttributes: 等新方法的使用
- 关于drawInRect: withAttributes: 等新方法的使用
- iOS7下的drawInRect的新方法drawInRect:withAttributes:使用
- drawInRect:withAttributes用法
- - (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated
- Objective-C 与Swift - UIView中的- (void)drawRect:(CGRect)rect
- NSString的drawInRect: withAttributes:的参数解析
- iOS UIView中 - (void)drawRect:(CGRect)rect;和-(void)ViewLayoutSubViews;的调用时机
- drawRect:(CGRect)rect方法
- Quartz 各种绘制图形用法 Quartz 各种绘制图形用法 分享类型:应用开发相关 - (void)drawRect:(CGRect)rect { CGContextRef
- Unknown type name "CGRect",did you mean "Rect"?
- Unknown type name "CGRect",did you mean "Rect"?的解决方案
- Unknown type name "CGRect",did you mean "Rect"?的解决方案
- UVA 624 CD ( 01背包 + 逆推路径)
- 高端玩家分析 DNF大搬运后TOP10大工作引荐
- 卡模拟相关网址
- Redis和Memcache的区别?
- Linux用户使用Axel加速下载
- - (void)drawInRect:(CGRect)rect withAttributes:(NSDictionary *)attrs;使用
- MongoDB的数据插入和查询
- 几本理财方面的书
- 草莓音乐节
- 《Linux内核修炼之道》 之 高效学习Linux驱动开发
- Linux下用wget下载百度网盘中的分享
- JMX 的理解
- 通过PL/SQL导入excel文件
- MS Chart学习总结