Skip to content

Instantly share code, notes, and snippets.

@echoz
Created May 11, 2012 13:11
Show Gist options
  • Save echoz/2659508 to your computer and use it in GitHub Desktop.
Save echoz/2659508 to your computer and use it in GitHub Desktop.
MNAttributed String check of conforms to NSCoding
if (([MNAttributedString lossless]) && ([[attrs objectForKey:key] conformsToProtocol:@protocol(NSCoding)])) {
[attributes insertObject:[self _dictionaryForAttributes:[NSDictionary dictionaryWithObject:[attrs objectForKey:key] forKey:key] range:range] atIndex:([attributes count]-1)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment