views:

315

answers:

1

How do I create a button with an images for normal & highlighted states in interface builder for cocoa application? I need a button like custom button in cocoa-touch and provide a graphics for default and highlighted states. Again, it's for pure mac application not for iPhone.

TIA

A: 

Turn off its bordered property and set its image (normal) and alternate image (highlighted).

Peter Hosey
Thank you for answering, that's what i did, but when I press it I see it inverting with kind of white border, and not the alternate image I put there. How can I see the alternate image when highlight? TIA
Nava Carmon
Try changing the button type. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSButtonCell_Class/Reference/Reference.html#//apple_ref/doc/constant_group/Button_Types
Peter Hosey
Thank you very much. Indeed changing the type to Momentary Change did the job!
Nava Carmon