views:

261

answers:

1

I have a UITableView which occupies the entire screen, besides a navigation bar. The UINavigationItem has a UIBarButtonItem that shows a previously hidden UIPickerView when tapped.

I'm trying to resize the UITableView so that it occupies the rest of the screen not used by the now visible UIPickerView.

I know the framework already does something like this, when focusing a text field, it resizes the entire app's view and pops up the keyboard at the bottom.

What's the best way to do this?
I'd just like to make sure I'm not doing it wrong :)

+1  A: 

You can alter the dimensions of a view by changing that view's frame property. The frame consists of two structs: a point indicating the origin (TL corner) of the view, and a size indicating its width and height. Simply create a new CGRect, assign it to your view's frame property, and you'll have dynamically resized your view.

Dave DeLong
So there is definetely no layouting offered by the framework?
Prody
In the sense of layout managers that you find in other GUI frameworks, not really. There are the springs and struts that you can set in Interface Builder, but they're not true "Layout" managers.
Dave DeLong
thanks :) ____________________________
Prody