i have a uitextview and i've set the text but it doesn't show up unless i click on the text view to edit it.
i don't want the text view to be editable and i want the text to just show up...
this is how i'm making it:
why does this not work yet you can do textView.text = @"blah" if textview is a uiTextView from an IBOutlet?
i don't want the text view to be editable and i want the text to just show up...
this is how i'm making it:
Code:
CGRect frame = CGRectMake(50, 50, 200, 200);
UITextView *textView = [[UITextView alloc] initWithFrame: frame];
textView.backgroundColor = [UIColor whiteColor];
textView.textColor = [UIColor colorWithRed: 0.8 green: 0.8 blue: 0.8 alpha: 1.0];
textView.font = [UIFont fontWithName:@"Helvetica" size: 17];
textView.editable = NO;
textView.text = NSLocalizedString(@"instructions", @"");
[textView setNeedsDisplay];
[parentView addSUbview: textView];
[textView release];
why does this not work yet you can do textView.text = @"blah" if textview is a uiTextView from an IBOutlet?