View Full Version : Cocoa paged view?

Sep 2, 2008, 11:48 AM

I can't find in Interface builder a view that behaves something like this (and I think it's just because I am new to Cocoa):

I want a view that has 2 pages, from which only 1 is visible at a moment. Think something like iPhoto image browser as view 1 and iPhoto image editing view as view 2. In view 1, if I double-click on an image, it gets me to view 2. Note that view 1 was taking all the window (or the most significant portion of it), but now it completely disappears and view 2 gets the control. When I hit a "back" button there, it gets me back to view 1.

What's the way to accomplish this? Have 2 nibs, each with one view, and somehow manage to do what I want? Or have one nib with a "paged" view taking the entire window, where page 1 would be edited in Interface builder to contain the controls of view 1 and page 2 to contain controls of view 2, and in the controller handle the switching (something like [pagedView setActivePage:1] and [pagedView setActivePage:2]?

Note that I am not speaking about tabbed view (a.k.a Segmented View), even though if the segment switching controls were invisible, it would do the job, but I am not sure if that is possible and also the right way to do what I want.

Please kick me in the right direction, I will read the docs then without a problem. Thanks for any suggestion.

Sep 2, 2008, 12:04 PM
Is NSTabView with "tabless" style the right way to do it? (discovered just now)

Sep 2, 2008, 01:24 PM