Do I need a UIWebView for this?

Discussion in 'iOS Programming' started by ranguvar, Aug 16, 2010.

  1. ranguvar
    Expand Collapse
    macrumors 6502

    Joined:
    Sep 18, 2009
    #1
    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:

    [​IMG]


    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?
     
  2. PhoneyDeveloper
    Expand Collapse
    macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    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.
     
  3. Luke Redpath
    Expand Collapse
    macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #3
    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).
     
  4. ranguvar
    Expand Collapse
    thread starter macrumors 6502

    Joined:
    Sep 18, 2009
    #4
    Seems like I'm going with a UIWebView then.
     

Share This Page