Make -[NSSegmentedCell rectForSegment:inFrame:] public

Originator:armadsen
Number:rdar://20964552 Date Originated:14-May-2015 04:40 PM
Status:Open Resolved:
Product:OS X SDK Product Version:10.10
Classification:Enhancement Reproducible:Always
 
Summary:
When subclassing NSSegmentedControl (and NSSegmentedCell) to customize its appearance, there is no public way to get the auto-sized width of cells for which an explicit width has not been set. This makes it quite difficult to draw the segments correctly, matching the click targets NSSegmentedCell uses for them.

NSSegmentedCell does have a private -rectForSegment:inFrame: method which works well, but as it is not public API, it shouldn’t be used in shipping apps.

It would be very helpful if this method was made public, or an alternative way of determining the rect or width of individual segments was exposed.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!