Reputation: 688
I would like to make a UITextView go full screen. How would I implement this?
Thanks for your help.
Upvotes: 2
Views: 1480
Reputation: 2535
Instead of using hard coded values for your frame I would recommend using:
CGRect r = [[UIScreen mainScreen] bounds];
[textView setFrame:r];
This would make your code more future proof (and work on all iOS devices).
Upvotes: 10
Reputation: 19469
I am not very clear about your requirement.
But if you want that textview becomes as big as the view (leaving the tabbar and Navigationbar if exists) then you can simply set the frame of your textView to (0,0,320,480).
You can do this from XIB or you can set it dynamically using IBOutlet
of your textView as shown below
[textView setFrame:CGRectMake(0,0,320,480);
Hope this helps you.
If your requirement is different then do let me know, I would be more than happy to re-structure my answer to satisfy your requirement.
Upvotes: 1