I have several UIButtons in my app with different graphics for their On/Off states. The smaller buttons all display correctly without any flickering, but the larger button (320x90px) will flicker a black color over the button when pressed up to 75% of the time. This is on the iPhone, not the Simulator. I've set different combinations of the UIButton's Default,Highlighted,Selected,and Disabled state images in IB but I still cannot get rid of 开发者_运维技巧this flicker. Is there something else I can try?
If you are doing something like button.selected = !button.selected
in your handler, then I had this problem as well.
I fixed it calling button.highlighted = NO
.
精彩评论