Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

oceandrive

macrumors newbie
Original poster
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.