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

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -