I have an issue with stroke color on 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)
iOS 13
iOS 14
It is working on iOS 13 but not working in iOS 14. Can anyone help me to resolve this issue?
Looks like Apple has changed the font outlines in iOS 14, the glyphs for 6 and 9 exhibit similar artifacts. I would file a bug with Apple.
Depending on your requirements, using UIFont.monospacedSystemFont(...)
could work, those glyphs still look OK to me. (Edit: "1" has artifacts in the monospaced version as well. Maybe use UIFont(name: "HelveticaNeue-Bold", size: 65)
instead?)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With