更易用的属性文本创建工具,使用链式语法。
支持 iOS 8.0+,基于 Objective-C。
安装
pod 'AXAttributedString'
手动
- 下载 AXAttributedString 仓库;
- 将 AXAttributedString 子文件夹复制到您的 Xcode 项目中;
#import <AXAttributedString/AXAttributedString.h>
.
使用
支持的属性列表
text
,如有必要,必须首先使用,不允许空格格式化子字符串。htmlText
,如有必要,必须首先使用,不允许空格格式化子字符串。
text
或htmlText
必须有一个。
foregroundColor
backgroundColor
font
systemFontSize
underlineStyle
underlineColor
baselineOffset
strikethroughStyle
strikethroughColor
paragraphStyle
strokeColor
strokeWidth
attachment
linkUrl
linkString
ligature
kern
shadow
textEffect
obliqueness
扩展
书写方向
垂直字形格式
联系我
- 电子邮箱: [email protected]
- 微信: arnold-xiao
很高兴它能对您有所帮助,您能为我点个赞吗? 谢谢!