I have an UIButton , in my application..
I want to show a selection of my button ... i am using this code
[Button setHighlighted:YES];
But its not work..
Can anyone help me?
Thanks in advance......
I have an UIButton , in my application..
I want to show a selection of my button ... i am using this code
[Button setHighlighted:YES];
But its not work..
Can anyone help me?
Thanks in advance......
See these posts.
http://forums.macrumors.com/showthread.php?t=530998
http://simonwoodside.com/weblog/2009/2/5/how_to_make_an_iphone/
You can solve this problem, by having two images for button. One for hightligthed state and one for normal state. When you create the button, create with normal state image as buttons background image. And when you select or focus on the button, change the image as highligthed background image.
[UIButton setBackgroundImage:[UIImage backgroundImage:@"ButtonSelected.png"] forState:UIControlStateSelected];
[UIButton setBackgroundImage:[UIImage backgroundImage:@"ButtonNormal.png"] forState:UIControlStateNoraml]