We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当前的init方法要传入一系列的ASAttributedString.Attribute,像这样: let aa = ASAttributedString( string: "aaaaaaaasss", .font(.systemFont(ofSize: 12)), .foreground(.label) ) 感觉不是很丝滑。 注意到ASAttributedString.Attribute里面的属性 let attributes: [NSAttributedString.Key: Any] 就是一个字典,但每次初始化都只加了一两个进去,能不能直接将字典放在 ASAttributedString 里面呢?然后链式调用将配置放进字典,更新覆盖,类似这样: let aa = ASAttributedString(string: "aaaaaaaasss") .font(.systemFont(ofSize: 12)) .foreground(.label) .font(.systemFont(ofSize: 20)) 这样感觉丝滑很多。 会考虑下吗?
The text was updated successfully, but these errors were encountered:
会考虑
Sorry, something went wrong.
是的链式调用比较方便,TextAttributes可以参考下这个
好的 近期会更新
No branches or pull requests
当前的init方法要传入一系列的ASAttributedString.Attribute,像这样:
let aa = ASAttributedString(
string: "aaaaaaaasss",
.font(.systemFont(ofSize: 12)),
.foreground(.label)
)
感觉不是很丝滑。
注意到ASAttributedString.Attribute里面的属性 let attributes: [NSAttributedString.Key: Any] 就是一个字典,但每次初始化都只加了一两个进去,能不能直接将字典放在 ASAttributedString 里面呢?然后链式调用将配置放进字典,更新覆盖,类似这样:
let aa = ASAttributedString(string: "aaaaaaaasss")
.font(.systemFont(ofSize: 12))
.foreground(.label)
.font(.systemFont(ofSize: 20))
这样感觉丝滑很多。
会考虑下吗?
The text was updated successfully, but these errors were encountered: