Show tab on the textview

Discussion in 'iOS Programming' started by oceandrive, Jul 23, 2009.

  1. oceandrive macrumors newbie

    Joined:
    Nov 17, 2008
    #1
    I have a small piece of code (Example Below) which is well formated with Tab's and new lines. But when I view this code on a text view it does not show the tab's, but it does show the new lines.

    PHP:
    @interface Animal NSObject 

            
    NSString *name
            
    NSString *description
            
    NSString *imageURL
    }
    What do I need to do to make sure the text is tabbed.

    Thanks for the help.
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    UITextView doesn't support tabs.

    Choices to implement this include:

    Possibly you could convert the tabs to spaces and use a fixed width font and then display with a UITextView. Actually this isn't simple.

    Use UIWebView.

    Use your own drawing code to draw each line into a view using the UIStringDrawing methods. Also complicated.
     

Share This Page