I suspect that the number of dividers in an NSSplitView is equal to [[MySplitViewObject subviews] count] -1
and that the index of any given divider in开发者_JAVA百科 an NSSplitView is equal to the index of the subview to the left of or above the divider (depending on the NSSplitView's orientation).
Is it, or is there some undocumented and exposed property of the NSSplitView that returns a list of the dividers?
I don't know any other way to know the number of dividers in a NSSplitView. The result is always accurate, because even hidden subviews are only collapsed.
As for the order (both views and dividers), it is guaranteed by the documentation:
Divider indices are zero-based, with the topmost (in horizontal split views) or leftmost (vertical) divider having an index of 0.
Note: You can also create a category that hides the computation of the number of dividers.
精彩评论