Reputation: 319
This is really strange. I have a UITextView properly connected with an OBOutlet. In my viewDidLoad I am updating it's text like so:
[tvDescription setText:@"This is some sample text "];
Then just for testing, I try to resize it with:
[tvDescription setFrame:CGRectMake(20, 20, 20, 20)];
The text updates fine, but no matter what I put in the sizes for setFrame, nothing happens, it stays its normal size. Its like it is locked.
tvDescription is the UITextView, which is 301 width and 104 height in the nib.
Upvotes: 0
Views: 317
Reputation: 14304
I would try taking a look at the Auto Resize Mask of the text view - Make sure it doesn't resize when it's displayed. If you're using auto-layout, make sure that the constraints match what you're trying to do.
Other than that, just make sure your outlets are hooked up (seems they are because of the text update) and it should work.
Upvotes: 2