Dec 27 2017
Storyboard ID Caveat
macOS 10.12, Xcode 9.2 Do not use the name of a viewController subclass as your Storyboard ID. I’ve had both ‘Storyboard […] doesn’t contain a controller with identifier ‘MyCustomController’ and the cast to MyCustomController failing randomly; in one instance a cast to NSViewController worked, but MyCustomController did not. When I set the identifier to “CustomVC” […]
Dec 29 2017
Assigning a button’s action – with added bug
Edited to add: This, apparently, works as intended – you need to assign the button’s _target_ with testButton.target = self. It doesn’t completely explain why the code is working under some circumstances, but it’s not a bug as such. This thoroughly spoilt my day today. I was convinced I’d gotten the ‘assign-an-action-on-the-fly’ code correctly, but […]
By Extelligent Cocoa • Bug Reports, Interface • • Tags: containerView, NSButton, storyboards