iOS手势

来源:互联网 发布:淘宝网店开店步骤 编辑:程序博客网 时间:2024/05/01 11:18
iphone3之前手势要通过重载UIResponder的几个手势响应函数自行处理。

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;

- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;

xcode4出来之后着实做和很多工作,为开发人员方便了动画,手势的,关于手势的类有:
轻击:UITapGestureRecognizer 
长按:UILongPressGestureRecognizer
滑动:
UISwipeGestureRecognizer

平移:UIPanGestureRecognizer
捏合: UIPinchGestureRecognizer
旋转:UIRotationGestureRecognizer
原创粉丝点击