BBASMComponentTouchDelegate.h
2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// BBASMComponentTouchDelegate.h
// SWAN
//
// Created by baidu on 2018/7/25.
// Copyright © 2018年 baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@protocol BBASMComponentTouchDelegate <NSObject>
/**
* 第一次手势触发
*
*/
- (void)firstTouch;
/**
* 手势结束,包含正常、错误、取消
*
*/
- (void)touchFinished;
/**
* 长按触发
*
*/
- (void)longPressStart;
/**
* 长按结束
*
*/
- (void)longPressEnd;
/**
* 触发Touch事件
*
* @params all 所有手势
* @params changed 修改的手势
* @params remaining 屏幕上面的手势
*/
- (void)triggerEvent:(NSString *)name
timestamp:(NSTimeInterval)timestamp
all:(NSSet *)all
changed:(NSSet *)changed
remaining:(NSSet *)remaining;
/**
* 是否支持全屏手势
*
*/
- (BOOL)supportFullscreenPopGesture;
// Generally, all responders which do custom touch handling should override all four of these methods.
// Your responder will receive either touchesEnded:withEvent: or touchesCancelled:withEvent: for each
// touch it is handling (those touches it received in touchesBegan:withEvent:).
// *** You must handle cancelled touches to ensure correct behavior in your application. Failure to
// do so is very likely to lead to incorrect behavior or crashes.
- (void)view:(UIView *)view touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
- (void)view:(UIView *)view touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
- (void)view:(UIView *)view touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
- (void)view:(UIView *)view touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
/**
是否是首次触摸
*/
@property (nonatomic, assign) BOOL isFirstTouch;
///当在 组件 中移动时且有绑定手势事件时,禁止屏幕滚动以及下拉刷新
@property (nonatomic, assign) BOOL disableScroll;
/// 开启touch事件
@property (nonatomic, assign) BOOL enableTouchEvent;
@end