Icons not showing
Closed this issue · 5 comments
I created a project from scratch, added your classes, made the window as in your example, added the images, but when I run it no images are shown in the sidebar. The sidebar is just gray.. Any idea what could cause this?
Thanks.
The sidebar does not add any items on itself. This is the job of the controller.
Take a look at the ITAppDelegate
class:
[self.sidebar addItemWithImage:[NSImage imageNamed:@"imageName"]
alternateImage:[NSImage imageNamed:@"imageName-pushed"]
target:self action:@selector(whatever:)];
This is what really adds the item to the sidebar.
Yes, I did add this, just like in the example project. (and yes, everything is linked up correctly).
Well, there's not enough information for me to help you. Is the code actually executed? Try doing a NSLog(@"%@", self.sidebar)
before the addItem...
call.
That's executing for sure. I have made a sample project showing the issue. hoping you can help.. Download here: https://copy.com/B4YsCFkW6wuO
Thanks!