Created
January 10, 2012 15:07
-
-
Save pita5/1589508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableData *data = [NSMutableData data]; | |
NSKeyedArchiver *archiver = [[[NSKeyedArchiver alloc] initForWritingWithMutableData:data] autorelease]; | |
[archiver setOutputFormat:kCFPropertyListXMLFormat_v1_0]; | |
[archiver encodeObject:self.attributedString]; | |
// Sanity check | |
NSMutableDictionary *dict = [NSPropertyListSerialization propertyListFromData:data | |
mutabilityOption:NSPropertyListMutableContainersAndLeaves | |
format:nil | |
errorDescription:nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment