views:

41

answers:

2

when i press the button i get the blue color , is there any way to just avoid getting that blue color when i press the button.

+2  A: 

You could add a background image of the button for the state UIControlStateHighlighted. The background image would be the same as the non-highlighted state.

Ross
+6  A: 

sets the button look to be consistent regardless of the state

[UIButton1 setBackgroundImage:[UIImage imageNamed:@"ButtonBack.png"] forState:UIControlStateSelected|UIControlStateNormal|UIControlStateHighlighted];
[UIButton1 setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected|UIControlStateNormal|UIControlStateHighlighted];
Aaron Saunders
nice. i didn't realise that these were bitmasks. This changes a lot!
Ross