To run the example project, clone the repo, and run pod install
from the Example directory first.
label.attributedText = QCAttributedString("abc")
.color(.blue)
.font(.systemFont(ofSize: 10))
.alignment(.left)
.append(", efg")
.appendAttr(
QCAttributedString(", emn")
.color(.green)
.build()
)
.firstSet(.red, of: "e")
.firstReplace(
"abc",
with:
QCAttributedString("cba")
.color(.cyan)
.font(.systemFont(ofSize: 20))
.build()
)
.appendImage...
.appendSpace...
.appendRoundedLabel...
.build()
if has libarclite_iphoneos.a or libarclite_iphonesimulatoros.a compile error, please make IPHONEOS_DEPLOYMENT_TARGET = '13.0'.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
Or add libarclite_iphonesimulatoros.a, libarclite_iphoneos.a into your /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib.
iOS >= 13.0
- Builder 模式,支持链式调用。
- 支持文字排版 RTL 模式。
- 支持文字里嵌入 UIImageView, UIView, CALayer。
- Attachment 依赖 YYText 实现。
QCAttributedStringBuilder is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'QCAttributedStringBuilder'
zxqqingchuan, 147373551+zxqqingchuan@users.noreply.github.com
QCAttributedStringBuilder is available under the MIT license. See the LICENSE file for more info.