У меня проблема с, я не могу установить новый текст в UITextView
. Я уже связал IBOutlet
с textView
в конструкторе интерфейса.Вот мой код
- (void)viewDidLoad
{
[super viewDidLoad];
self.title = @"Detail";
[self setupTextView];
}
- (void) setupTextView
{
self.textDescription = [[[UITextView alloc] init] autorelease];
NSString *foo = @"blah blah blah";
textDescription.text = foo; //I try this and it didn't work
//here didn't work too.
//textDescription.text = [textDescription.text stringByAppendingString:foo];
/*Here is something for dynamic textview*/
CGRect frame;
frame = textDescription.frame;
frame.size.height = [textDescription contentSize].height;
textDescription.frame = frame;
/**/
}
Спасибо за помощь anu:)