I have a very basic NSImageView Sub Class, and adding it via a Custom View item in the Interface Builder from XCode:
class DropView:NSImageView {
required init?(coder: NSCoder) {
super.init(coder: coder)
print("init") --> Displayed
self.image=NSImage(named: "DropImage")
}
}
However my DropImage (which returns a non-nil element) is not displayed on the ImageView. Am I missing anything ?
A Custom View in IB is just a
NSView.NSImageViewis a subclass ofNSControland needs a cell to function. Replace the Custom View by an Image View and change the class.