views:

24

answers:

1

Hello, I'm creating a tab-based app. I want one of the tabs to include the following:

-Have a set of UIButtons -When you click on one of the buttons it loads a view beneath the buttons -Each button has a different view -No navigation controller just load the view on the same page without animation -Still can click on the other buttons

How do I go about doing this? Please help!

A: 

If the views are relatively lightweight, you can put them all into the .xib with hidden = YES, then put an IBOutlet to each. When you tap a button, hide the others and show the correct one.

If they're more complicated you might also want make some sort of ViewController-like object for each one of them to manage state.

You can also create and swap the subviews in code, again keeping around a pointer to each view or you can use tags to identify them.

Andrew Pouliot
Where do I' put the buttons outside all the views or on every view?
aggiesfan64
Nevermind what I said. I figured it out, thankfor the help.
aggiesfan64