Word-Wrap UITextView
I'm not using IB so is there a way to do this is code?
Thanks in advance.
Macbook Pro late 1008, Mac OS X (10.5.7), For iPhone
Macbook Pro late 1008, Mac OS X (10.5.7), For iPhone
@interface MyViewController : UIViewController {
UITextView *myTextView;
}
@property (nonatomic, retain) UITextView *myTextView;
@end
#import "MyViewController.h"
@implementation MyViewController
@synthesize myTextView;
- (void)viewDidLoad {
[super viewDidLoad];
CGRect frame = CGRectMake(20, 20, 280, 200);
UITextView *aTextView = [[UITextView alloc] initWithFrame:frame];
self.myTextView = aTextView;
[aTextView release];
[self.view addSubview:myTextView];
}
- (void)dealloc {
[myTextView release];
[super dealloc];
}
@end
firstView.text = [NSString stringWithFormat: @"%@", item];
Ok, I need to make UITextView Autowordwrap for an iPhone app
How can I insert hard line breaks into UITextView text?
Duykur wrote:
I already tried /n
Duykur wrote:
\n also doesn't work.
Word-Wrap UITextView