简体   繁体   中英

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. Same code will continue to work on lower iOS versions. If the same code is built/deployed using Xcode 11, iOS 13 renders the strings without any issue. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM