im parsing HTML string - has both text and image - to NSMutableAttributedString to display in UITextView using the following code. All tags are perfectly parsed except; if the image is large, it is not resized to fit in the frame. It gets truncated. Any help?
do {
let attributes = try
NSMutableAttributedString(
data: conversationForum.discussionText.dataUsingEncoding(NSUTF8StringEncoding)!,
options: [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: NSUTF8StringEncoding],
documentAttributes: nil)
let range = NSMakeRange(0, attributes.string.characters.count)
attributes.addAttributes([NSFontAttributeName: font], range: range)
self.attributedText = attributes
}
catch {
self.attributedText = NSMutableAttributedString()
}
for example: the actual image is http://www.cruxcatalyst.com/wp-content/uploads/lalalala.jpg but i'm getting it truncated as "this"