為什么80%的碼農都做不了架構師?>>> ??
http://blog.csdn.net/assholeu/article/details/16363241
touchesEnded不響應主要存在以下幾種情況
case 1 :?userInteractionEnabled
部分控件如UIImageView,userInteractionEnabled默認為NO,需要將其設置為YES;
break;
?
case 2 : 控件被其他控件所遮蓋
[[self?nextResponder]?touchesBegan:touches?withEvent:event]?//這時需要設置消息鏈穿透?
break;
?
case 3 :?UITapGestureRecognizer
UITapGestureRecognizer如果使用在子控件的父控件上,那么子控件的touchesEnded不會執行,而是執行touchesCanceled,并且touchesBegan會延遲執行,會明顯感覺到延遲。
UITouch?*touch?=?[touches?anyObject];??
if([touch?tapCount]?==?1)?{??
//?do?sth?????
}//?解決辦法??
break;
?
default : ?其他的評論補充
break;