In this Mac App, I have an IBOutlet (which is defined as instance of a subclass of NSView).
When I connect the IBOutlet to the code, referencing as file's owner, it works OK.
But if I reference to the class, it crashes, when I access a specific IBOutlet (but other IBOutlets are accessed just before it without crashing).. The IBOutlet turnPageControl is defined as instance of subclass of NSView.
Note: I have implemented several init methods:
override init(window: NSWindow!) { }
required init?(coder: (NSCoder?)) { } // Yes, (NSCoder?)
convenience init(parameters) {
// loading from nib
}
override func windowDidLoad() {
super.windowDidLoad()
// Access turnpageControl
I get those calls before crash:
init(window:)
init(parameters:)
init(window:)
windowDidLoad() -> crash inside on accessing the IBOutlet
for turnPageControl.isHidden = true
Is there any reason to this ?