vik*_*ati 10 nsmutablestring ios swift ios13 ios14
我在 iOS 14 上遇到笔触颜色问题。
let attributes: [NSAttributedString.Key: Any] = [
.foregroundColor: UIColor.white,
.strokeColor: UIColor.black,
.font: UIFont.systemFont(ofSize: 65, weight: .black),
.strokeWidth: -1
]
lableNumber.attributedText = NSAttributedString(string: "2", attributes: attributes)
Run Code Online (Sandbox Code Playgroud)
iOS 13
iOS 14
它适用于 iOS 13,但不适用于 iOS 14。谁能帮我解决这个问题?
看起来 Apple 已经更改了 iOS 14 中的字体轮廓,6 和 9 的字形也呈现出类似的痕迹。我会向 Apple 提交错误。
根据您的要求,使用UIFont.monospacedSystemFont(...)可以工作,这些字形对我来说仍然看起来不错。(编辑:“1”在等宽版本中也有工件。也许可以使用UIFont(name: "HelveticaNeue-Bold", size: 65)?)
| 归档时间: |
|
| 查看次数: |
546 次 |
| 最近记录: |