Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

SuicidalCheezIt

macrumors newbie
Original poster
Aug 9, 2008
1
0
I've been wondering how apple did the iTunes style tab view. Opening the iTunes nib files shows normal NSTabView styled tabs. Is there any code documented for this?
 

Sijmen

macrumors 6502a
Sep 7, 2005
709
1
I've been wondering how apple did the iTunes style tab view. Opening the iTunes nib files shows normal NSTabView styled tabs. Is there any code documented for this?

Some call it magic
The search for the grail

Subclassing NSTableView is the answer
Now you know that
For sure

:D
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
The behavior of the tabs is different than a normal tab view in that the selected tab covers up the previous tab, which NSTabView does not do. So, I'd suggest implementing a custom view that contains custom NSButtons for the tabs (you'd want to subclass NSButton and NSButtonCell), and then below those buttons you'd want a standard tabless NSTabView. The buttons would then switch your internal tab view.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.