NSTabViewController is not set as NSToolbar delegate on 10.11 (15A244d)
| Originator: | rocknguilleh | ||
| Number: | rdar://22348095 | Date Originated: | 19-Aug-2015 09:30 PM |
| Status: | Open | Resolved: | No |
| Product: | OS X SDK | Product Version: | 10.11 (15A244d) |
| Classification: | Reproducible: | Yes |
The scenario is an application that uses a storyboard and contains an NSTabViewController subclass that uses the toolbar style for displaying its tab view items. As suggested in the SDK headers and documentation, the subclass implements some of the NSToolbarDelegate methods to insert additional items to the toolbar. This works perfectly on 10.10. However, on 10.11, it seems like the NSTabViewController subclass is not set as the delegate of the corresponding NSToolbar instance (the value of that property seems to be an instance of a private class named NSTabViewControllerToolbarUIProvider), so NSToolbarDelegate methods don't get called and custom toolbar items cannot be inserted into the toolbar. Steps to Reproduce: 1. Create a new OS X app Xcode project that uses a storyboard. 2. Set the main window controller's contents to an NSTabViewController 3. Create an NSTabViewController subclass and set it as the class of the tab view controller in Interface Builder. 4. Implement some NSToolbarDelegate methods in that subclass and set some breakpoints on them. 5. Run the app on OS X 10.10. The subclass instance is set as the delegate of the NSToolbar. 6. Run the app on OS X 10.11. The subclass instance IS NOT set as the delegate of the NSToolbar. Instead, an NSTabViewControllerToolbarUIProvider is the delegate now.
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!
Still present on El Capitan release
Still not fixed on OS X 10.11 final version nor in 10.11.1 Beta (15B22c)