ludo
ludo

Reputation: 1479

Get and display HTML data from SQLite3 (Iphone)

I try to retrieve HTML data from my database and display them in a UITextView, the only problem is that I don't know how to tell him that its HTML code and not only text, for the moment I have that:


NSString *aDescription = [NSString stringWithUTF8String:(char *)sqlite3_column_text(getFicheStatement , 1)];

Thanks,

Upvotes: 1

Views: 546

Answers (2)

nevan king
nevan king

Reputation: 113757

You won't be able to put any styles into a UITextView. If you want to keep the styles that are in the HTML, the simplest thing to do is to put it into a UIWebView. If you don't want to use a UIWebView, you'll have to parse the HTML yourself, then try to style lots of UILabels and put them together, making sure they align properly. You'll have to deal with flowing the text yourself too.

A UIWebView will save you a lot of trouble.

Upvotes: 1

Alex Reynolds
Alex Reynolds

Reputation: 96967

Perhaps you want to try UIWebView, instead?

Upvotes: 4

Related Questions