Formatting Text in Interface Builder??

Discussion in 'iOS Programming' started by salvadormg, Sep 10, 2009.

  1. salvadormg macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #1
    Hi,

    Just one quick question, i am currently working in interface builder and i am writing a lot of text in a text view and i copy and paste all the text i wrote up earlier from another programme (there is a lot of text! so i can't wright it all out again it would set me back days...) and when i paste it in it just stays all in one "lump", i can't make spaces cos every time i press enter it just goes out of the text box, how do i make spaces to make new lines or tab to format the text to look better?? I can't find it anywhere and i am sure its one of those silly simple answers that just didn't occur to me at the time.. can anyone help???

    Thanks
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    Consider using UIWebview for formatted text. Put the text in a file that you add to your project and load it into a webview at runtime.
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    You can use Option-Return for soft-returns. As for tabs, don't. Textviews are not meant for fancy formatting, as stated in the documentation. Instead, "to display more complex styling in your application, you need to use a UIWebView object and render your content using HTML."
     
  4. salvadormg thread starter macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #4
    That worked perfectly thats!! Now, back to work for 5 more hours.... don't think i will be sleeping tonight! :p
     

Share This Page