tags:

views:

22

answers:

1

Is it possible to make it so that the user can click on an NSImage and trigger an action? How can I do this, through Interface Builder or programmatically?

+2  A: 

Yeah:

[myButton setImage:[NSImage imageNamed:@"mypng.png"]];
thyrgle
Hmmm, I'm not able to connect outlets to buttons I am making in IB. Why might that be?
Regan
@Regan: That's another question.
thyrgle
Oh, nevermind, it was because I hadn't changed the outlets from NSImage outlets to NSButton ones.
Regan