PDA

View Full Version : Do I need a UIWebView for this?




ranguvar
Aug 16, 2010, 03:44 AM
Hi,

In my app, I'm going to display data that contains styled text, links, images and maybe even embedded video. In the end, it should look somewhat like the Articles app:

http://omploader.org/vNTk5Nw/Articles.png


I'm not really keen to actually have to pull data from a server and then reformat it in HTML so that the UIWebView can display it correctly - that seems like a lot of work.

Is there maybe an easier way to display such data or will I need a UIWebView?



PhoneyDeveloper
Aug 16, 2010, 10:17 AM
The only general solution to drawing styled text is web view. It might be possible to use core text for this but I don't think there's a simple, existing, general solution.

The only other general existing solution I know of is three20 lib, which has a styled text label class.

Writing your own general solution will be a lot of work. However you do this the text will have to have some kind of styles applied, analogous to how html works.

Luke Redpath
Aug 16, 2010, 05:56 PM
Use a UIWebView; if you think reformatting the content for UIWebView is a lot of work, you don't even want to know about the alternative solution (which involves CoreText and a lot of banging your head against a wall).

ranguvar
Aug 17, 2010, 03:05 AM
Use a UIWebView; if you think reformatting the content for UIWebView is a lot of work, you don't even want to know about the alternative solution (which involves CoreText and a lot of banging your head against a wall).

Seems like I'm going with a UIWebView then.