4

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

Nava Carmon
  • 4,523
  • 3
  • 40
  • 74

1 Answers1

14

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

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
  • 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 Apr 21 '10 at 05:22
  • 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 Apr 21 '10 at 05:42
  • 3
    Thank you very much. Indeed changing the type to Momentary Change did the job! – Nava Carmon Apr 21 '10 at 05:53