문제

I'm trying to discern what kind of control is used in Xcode for the Navigator pane on the left hand side (see image below).

Xcode Navigator Header

Essentially, this functions as a segmented control but the style differs from the standard NSSegmentStyle enums.

Is this a UISegmentedControl subclassed to do its own drawing, or is there another type of control that could be used here instead?

도움이 되었습니까?

해결책

Investigating with the F-Script tool for Cocoa, I see that this part of Xcode's UI is implemented by an instance of an NSMatrix with the following key observations:

  • Its cells are custom classes derived from NSButtonCell, presumably for custom drawing and some eventing.
  • The mode property of the NSMatrix instance is set to NSRadioModeMatrix, to make sure that only one cell gets selected.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top