In my app, I am trying to archive an NSAttributedString
object so I have successfully converted it to an NSData
object using the following code:
NSData *attrStrData = [attrStr dataFromRange:NSMakeRange(0, attrStr.length) documentAttributes:NULL error:nil];
Now I want to convert this NSData
object back to NSAttributedString
. I believe on OSX
you have some methods for this, but are there any on iOS
? I found NSAttributedString+Encoding
, but there seems to be less support for it and it is not available on CocoaPods
. Any suggestions are welcome.