[英]NSAttributedString goes invisible on iOS 13 when build with Xcode 10.3
I'm seeing an issue with Xcode 10.3 and iOS 13. With this setup if I use NSAttributedString and set it to a UILabel, the text goes invisible.我看到 Xcode 10.3 和 iOS 13 存在问题。使用此设置,如果我使用 NSAttributedString 并将其设置为 UILabel,则文本将不可见。 Same code will continue to work on lower iOS versions.
相同的代码将继续在较低的 iOS 版本上工作。 If the same code is built/deployed using Xcode 11, iOS 13 renders the strings without any issue.
如果使用 Xcode 11 构建/部署相同的代码,则 iOS 13 会毫无问题地呈现字符串。 Has anyone run in to this yet OR have potential solutions?
有没有人遇到过这个问题或有潜在的解决方案?
// attrlabel : UILabel
let attrStr = NSMutableAttributedString.init(string: str, attributes: [NSAttributedString.Key.textEffect: NSAttributedString.TextEffectStyle.letterpressStyle])
attrLabel.attributedText = attrStr
I had the same problem.我有同样的问题。 In my case I fixed it by not using.textEfect key, I use.attachment key instead
在我的情况下,我通过不使用 .textEfect 键来修复它,而是使用 .attachment 键
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.