Hi all,in my app i am having many ViewControllers.Most of them have tableViews as subView.Many cells of the tableView have label and textField as subView.When from potrait mode to landscape mode i change,tableView gets resized (i.e width and height of tableView gets adjusted to that of screen).But my labels and textField width wont get changed.Also actionsheets.If i print width and height in landscape it is(320.0,460.0).so how to adjust the size of my subViews when there is change in orientation
A:
You have to make the subviews automatically resize when the available space changes by calling something like
someSubview.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
when creating them.
In Interface Builder, in the Size Inspector for you views (Command-3), you just click on the two arrows within the square under "Autosizing" in the Size Inspector to make them both bright red, which is the equivalent of the above code.
mrueg
2009-09-17 15:44:41