I am changing the font of textview, after I get attributed string then I use to pass it to another controller which also shows me attributed string. I would like to convert attributed string to NSString
(with specific font which I have changed).
I am using
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:text.attributedText];
NSAttributedString *nas = [[NSAttributedString alloc] initWithData:data
options:nil
documentAttributes:NULL
error:NULL];
NSString *str = [nas string];
Which shows below log:
2014-11-17 14:23:17.094 format[2785:98416] bplist00‘°¢T$topX$objectsX$versionY$archiver—TrootÄØ"
%&'().6EFJRSTU[`glt}~ÅâäãåíñúU$null‘
XNSString\NSAttributesV$class_NSAttributeInfoÄÄÄ!ÄYThud high“
ZNS.objectsÄ¢ÄÄ”
!WNS.keys£ÄÄ ÄÄ£"#$ÄÄÄ[NSUnderline_NSParagraphStyleVNSFont”
*+,-(ZNSTabStops_NSWritingDirectionÄ
Ä