0

I'm working on a Mac OS app with a sidebar with multiple exclusive views (e.g. table of contents, document info, and search results). Currently, I'm using an NSTabView. However, instead of using the default segmented control to select a tab, I'd like to use icons, like the sidebar in XCode.

As a relative novice to Cocoa, it's not clear to me what the right way is to do this. An NSTabView seems to require its own scene, and it doesn't seem like I can add additional controls in the scene above the tab content. Do I need to create a new split view controller scene that contains both the tab scene and buttons?

Alternatively, do I need to stop using an NSTabView and implement the tab functionality manually? I'm hesitant to do this because I don't know what accessibility concerns I might miss.

Thom Smith
  • 13,916
  • 6
  • 45
  • 91
  • Maybe this helps: [how to add an icon to NSTabViewItem using the method drawlabel:inRect in cocoa?](https://stackoverflow.com/questions/11520961/cocoa-how-to-add-an-icon-to-nstabviewitem-using-the-method-drawlabelinrect-in) – Willeke Aug 04 '21 at 20:39
  • It looks like that question is about adding an icon to one of the items in the segmented control, not replacing that segmented control entirely. I was under the impression that it wouldn't be possible to customize the existing control segmented control to the desired extent. Am I mistaken? – Thom Smith Aug 04 '21 at 20:58
  • "An NSTabView seems to require its own scene" What is a guy that you so-call 'scene' that you are talking about? – El Tomato Aug 04 '21 at 21:56

0 Answers0