views:

23

answers:

1

Hi,

I am working on a GUI in Interface Builder for an iPhone app.

In my view controller, I would like to have a toolbar at the top and then some controls (i.e. a view) that are centralized in the lower portion of the view.

The problem that I am having is that I want things to be centralized in the area below the toolbar but the whole screen size (including the toolbar) is being used when centralizing.

Any ideas how to effectively achieve this type of layout - it must be pretty common but I haven't found anything yet.

Thanks, Alan

+1  A: 

You might want to try putting all your control area below the toolbar in a separate subview, since that subview might do what you want as it resizes.

hotpaw2
That is exactly what I want, but I only seem to be able to add a single control to my main view area (i.e. either a toolbar OR a subview NOT both). Am I missing something?
Alan Spark
I think I've got it working. It was necessary to add a subview, then add the toolbar to the top and another subview to the bottom. I then set the autosizing properties of the toolbar to dock to the top and for the subview to fill the available space. Thanks for your help.
Alan Spark