使用gestureRecognizer
怎麼實現,用戶操作時有下列的效果?
touchDownInside
(視圖變亮)touchUpInside
(確認動作)touchUpOutside
(取消和重置高亮顯示)
謝謝咯
在用戶進行四種基本操作時使用方法:
1)觸摸屏幕時:
-(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event;
2)手指滑過屏幕時(和手指觸摸重復)
-(void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event;
3)手指遠離屏幕時
-(void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event;
4)系統事件,中斷屏幕觸摸
-(void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event;