In my app, I have a UILabel and I set an attributedText on it like this:
let htmlString = try? NSMutableAttributedString(data: data, options: [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: String.Encoding.utf8.rawValue], documentAttributes: nil)
let characterCount = htmlString?.string.characters.count ?? 0
htmlString?.addAttributes([NSParagraphStyleAttributeName:paragraphStyle,NSBaselineOffsetAttributeName:0], range: NSMakeRange(0, characterCount))
self.chapterTextLabel.attributedText = htmlString
When I launch my app on a real iPhone or iPad Device or in an iPad Simulator, that works great, but when I launch it on an iPhone Simulator (SE, 7 or 7 Plus), my label doesn't show my text.
What is really funny, when I enter into the view debugger, my text is there!
So, is that a problem in my app or is it an iPhone Simulator problem?