开发者

Get and display HTML data from SQLite3 (Iphone)

开发者 https://www.devze.com 2022-12-13 18:36 出处:网络
I try to retrieve HTML data from my database and display them in a UITextView, the only problem is t开发者_StackOverflowhat I don\'t know how to tell him that its HTML code and not onlytext, for the m

I try to retrieve HTML data from my database and display them in a UITextView, the only problem is t开发者_StackOverflowhat 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,


Perhaps you want to try UIWebView, instead?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消