tags:

views:

43

answers:

2

Hi,

Following up on this question: http://stackoverflow.com/questions/3800253/kiosk-applications-os-x-programming-multiple-monitors

I'm an iPhone programmer just starting out with OS X programming, and I'd like to know how I can present multiple views sequentially.

What I basically need to do is - Have a welcome screen with a button called "Click here to continue". Once the user clicks that button, it needs to completely replace the view with another view presenting a table view of options that the user can choose from.

I actually need to create a couple more screens, but any help on how to get this basic setup can help me get started. The problem I'm having is almost all the mac application source code available on Apple's website seems to be oriented towards single window applications popping up multiple windows for any additional tasks.

Thanks,
Teja

+1  A: 

Make a tabless tab view, and put each of your views into one of the tab view items. In Interface Builder, each tab view item will have a view automatically, so you just need to put all of the subviews for that tab into that view.

You can then switch tabs from code—e.g., in response to the “Next” button.

Peter Hosey
I would discourage the use of an NSTableView to present user choices. If the choices are always a fixed number and a relatively small list, use plain old checkbox-style buttons or an NSMatrix of radio button cells. You should only use a table view if the list is large enough to require scrolling.
Joshua Nozzi
@Joshua "tab view", not "table view"
Dave DeLong
Take another look. OP said, "presenting a table view of options" - your answer was a better place for the addendum. :-)
Joshua Nozzi
Good catch, Joshua. Another way would be to simply have some push-button NSButtons, or maybe push-button button cells in an NSMatrix. It all depends on what the questioner means by “options the user can choose from”.
Peter Hosey
Agreed. Little hard to suggest which is best but it definitely depends on how big the list is.
Joshua Nozzi
Thanks, this is probably the right way to do it, but for the sake of convenience / deadlines, I'm going to use M3NavigationView for now. The list is basically a list of media files in a directory which lets the user pick one.
Tejaswi Yerukalapudi
+3  A: 

I enjoyed using M3NavigationView from Martin Pilkington http://www.mcubedsw.com/dev

Basically it pushes and pops NSViewControllers on a stack and allows you to animate between them. I am doing this for a quick setup wizard on an app I am working on.

Colin Wheeler
Oooh. Bonus points for drawing attention to this. Thanks for the link.
Joshua Nozzi
Wow, this is perfect for me, all his code says copyrighted though, that might be a problem. Anyway, this gives me a nice start, thanks!
Tejaswi Yerukalapudi
Colin Wheeler