CATextLayer类

CATextLayer 提供了简单的文本布局 文本渲染的图层类。

文本只能是NSString 或者 NSAttributedString。默认为nil

@property(copy) id string;
字体可以是CTFontRef,CGFontRef 或者字符串命名的字体。默认为Helvetica字体 只有在使用字符串的属性不是 NSAttributedString
@property CFTypeRef font;

字体大小。默认为36. 只有在使用字符串的属性不是 NSAttributedString. Animatable (Mac OS X 10.6 and later.)

@property CGFloat fontSize;
用foregroundColor颜色画string。默认为不透明的白色。只有在使用字符串的属性不是 NSAttributedString。Animatable (Mac OS X 10.6 and later.)
@property CGColorRef foregroundColor;
默认为No.  当Yes时,字符串自动适应layer的bounds大小
@property(getter=isWrapped) BOOL wrapped;
设置缩短的部位
@property(copy) NSString *truncationMode;
设置字体的排列格式
@property(copy) NSString *alignmentMode;





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值