ios7 - UIButton's UIControlStateHighlighted only working for longer taps -
i set titlecolor , backgroundimage uibutton, works if press uibutton little bit longer. quick taps, change isn't visible. there possibility @ least let flickr these kinds of taps?
[button settitlecolor:[uicolor redcolor] forstate:uicontrolstatenormal]; [button settitlecolor:[uicolor whitecolor] forstate:uicontrolstateselected]; [button settitlecolor:[uicolor whitecolor] forstate:uicontrolstatehighlighted]; [button setbackgroundimage:whitebackgroundimage forstate:uicontrolstatenormal]; [button setbackgroundimage:redbackgroundimage forstate:uicontrolstateselected]; [button setbackgroundimage:redbackgroundimage forstate:uicontrolstatehighlighted];
this due adding button uitableview or uiscrollview.
for buttons in uitableview add viewdidload:
self.tableview.delayscontenttouches = no; (id obj in self.tableview.subviews) { if ([obj respondstoselector:@selector(setdelayscontenttouches:)]) { [obj setdelayscontenttouches:no]; } } for buttons in uiscrollview add this:
self.scrollview.delayscontenttouches = no;
Comments
Post a Comment