views:

344

answers:

1

What's the purpose of having the Simulated User Interface elements, i.e. the top and bottom toolbars? Is this to allow you to design with the space accounted for but the actual toolbars would be provided by the Navigation Controller?

+2  A: 

Is this to allow you to design with the space accounted for but the actual toolbars would be provided by the Navigation Controller?

Yes. This makes it easier for you (and IB) to position and scale everything when these bars are actually used.

Edit:

As the name "Simulated User Interface Elements" tells you: This elements have no effect on the view they're simulated in. If your app happens to never use a navigation controller (or a toolbar etc.), the view will be scaled up and its content, too. For this the autoresizingMasks become handy.

bddckr
so how do you properly access the top and bottom Toolbar in a view that has been pushed on top?
Driss Zouak
You'd do this in the `UIViewController` subclasses. Using `self.navigationController.toolbar` for example. `UIViewController` has some nice properties that will get used in the navbar for example, like `self.title`. Have a look at this guide by Apple: http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/Introduction/Introduction.html
bddckr