-
UIView上的滑动手势及动作
-
- UIPanGestureRecognizer *gestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:flowView action:@selector(handleGesture:)];
- [flowView addGestureRecognizer:gestureRecognizer];
-
-
- flowView.userInteractionEnabled = YES;
- UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:flowView action:@selector(goBigImageView)];
- [flowView addGestureRecognizer:tap];
- - (void)handleGesture:(UIPanGestureRecognizer *)recognizer {
-
- if (recognizer.state == UIGestureRecognizerStateChanged){
- NSLog(@"UIGestureRecognizerStateChanged");
- }else if(recognizer.state == UIGestureRecognizerStateEnded){
- NSLog(@"UIGestureRecognizerStateEnded");
- }else if(recognizer.state == UIGestureRecognizerStateBegan){
- NSLog(@"UIGestureRecognizerStateBegan");
- }else if(recognizer.state == UIGestureRecognizerStateCancelled){
- NSLog(@"UIGestureRecognizerStateCancelled");
- }else if(recognizer.state == UIGestureRecognizerStateFailed){
- NSLog(@"UIGestureRecognizerStateFailed");
- }else if(recognizer.state == UIGestureRecognizerStatePossible){
- NSLog(@"UIGestureRecognizerStatePossible");
- }else if(recognizer.state == UIGestureRecognizerStateRecognized){
- NSLog(@"UIGestureRecognizerStateRecognized");
- }
-
- }
-
相关阅读:
bootstrap-treeview中文API 以及后台JSON数据处理
@RequestMapping与@ModelAttribute 套路
shiro文档
自定义页面方法:${fns:sayHelloToName('zxw')}
如何正确设置博客园的个人博客访问量-百度统计
如何给博客园的博客添加时钟
如何给自己的博客园的博客增加打赏设置
python-turtle-画雪花-2种方法及效果的详解
CUP监测1分钟(60s)的python的matplotlib动态作图
tkinter+pickle+python的一个登录界面设计
-
原文地址:https://www.cnblogs.com/ranger-jlu/p/3885748.html
Copyright © 2020-2023
润新知