AttributedString from NSData on iPhone.
AttributedString from NSData on iPhone.
- Subject: AttributedString from NSData on iPhone.
- From: Sandro Noël <email@hidden>
- Date: Thu, 5 Aug 2010 11:16:29 -0400
Hello.
I'm trying to take an attributed string from a PDF document and reproduce it on the phone.
passing thru a SQLite Database.
basically, i write to the database using
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObject:NSRTFDTextDocumentType forKey:NSDocumentTypeDocumentAttribute];
[dict setValue:[NSNumber numberWithInt: NSUTF8StringEncoding] forKey:NSCharacterEncodingDocumentAttribute];
NSData *stringData = [[tempString dataFromRange:range documentAttributes:dict error:&error] copy];
node.attributedStringData = stringData;
*Node is my Managed Object Model entity, tempString is the attributed string from the PDF.
So all the attributed strings get inserted into the database, and that database is sent to the iPhone
Back on the iphone, I'd like to restore that attributed string from core data to an NSAttributedString object.
and write that attributed string into a custom UITableViewCell, presumably using CoreText.
any pointers on how that could be done?
or am I over doing it and missed out on a cool class that does it all for me... as usual...
best regards
Sandro Noel._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden