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;