0

I have a question regarding the several images and sound files in the Media tab of IB's library: how can they be used in code? I want change the image of a NSImageVew to NSRevealFreestandingTemplate, but how can I access it? I'm pretty sure there must be a better way than creating a hidden image view and pulling it from there. Any ideas?

Thank you!

Kevin Chavez
  • 949
  • 1
  • 11
  • 27

2 Answers2

2

[imageView setImage:[NSImage imageNamed:@"NSRevealFreestandingTemplate"]];

VenoMKO
  • 3,294
  • 32
  • 38
2

Use NSImage's imageNamed: method to get system images. You can use any of the values found in NSImage's Constants section as the name. To get the image you specified, you would use:

[NSImage imageNamed: NSImageNameRevealFreestandingTemplate];
ughoavgfhw
  • 39,734
  • 6
  • 101
  • 123