tags:

views:

64

answers:

2

how to change the color of the button when i just touch it...i mean to say when the button is higlighted. i want to change the default Blue color

A: 

You can use: setBackgroundImage:forState

[myButton setBackgroundImage:genericImage forStates:UIControlStateNormal];
[myButton setBackgroundImage:buttonBackgroundPressed  
                   forStates:UIControlStateHighlighted];
The MYYN
A: 

One way you can do it, the easier way, is within Interface Builder.

  • Select the button that you want to adjust the state colors for
  • Hit CMD+1, selects the first tab called "Button Attributes"
  • You can set the different attributes for the different states by clicking on the Drop Down List which currently says "Default State Configuration"
milesmeow