I'm having some problems with displaying an image in a window that I moved away from the Main storyboard into its own xib file.
I created a LoginWindow.xib for a window that I need to display, and I initialize its view controller using the regular
self.loginViewController = [[LoginViewController alloc] initWithWindowNibName:@"LoginWindow"];
[self.loginViewController showWindow:self];
In the window xib I connected the file's owner window delegate to the window so all my code from - (void)windowDidLoad in the LoginViewController works perfectly, the whole thing.
However, I have an NSImageView that should displayed in the window. But the image is displayed in the interface builder, but NOT in the running app and I have no idea why.
On the screenshot below you can see the image has the correct image name (from the "Assets.xcassets" file), and is displayed in the Interface Builder, but not in the running app.
(Note: The gradient view below the image is a custom view that overrides drawRect to create a gradient)
I've also used the UI debugger to see if the image is displayed below the gradient view, but no success. The strange thing is that the image even is showed in the UI layers debug window thingy (screenshot 2 below)...
I'm probably missing a simple checkbox or value that needs to be set or connected, since all this worked perfectly before I moved the window away from the Main.storyboard file and into a separate XIB file...
Does anybody have an idea how/why? I've also already cleaned the whole build directory, closed and re-opened xcode, ... you name it.