2nd time - completely resolving conflict between custom tap gesture & onscreen control taps

This commit is contained in:
True Zhuanjia
2024-08-16 21:45:50 +08:00
parent 6e3c982a22
commit 53e68258f3
7 changed files with 44 additions and 57 deletions
+1 -2
View File
@@ -1044,8 +1044,7 @@ static float L3_Y;
bool oscTouched = updated || stickTouch;
if(oscTouched){
StreamView *streamView = (StreamView* )self->_view;
for (UIGestureRecognizer *gesture in _view.gestureRecognizers) {
for (UIGestureRecognizer *gesture in _view.superview.gestureRecognizers) { // we'll iterate the superview(streamframe view, where all the custom gestures are added), instead the streamview, that the osc buttons are pressed
if ([gesture isKindOfClass:[CustomTapGestureRecognizer class]]) {
// This is a CustomTapGestureRecognizer
CustomTapGestureRecognizer *tapGesture = (CustomTapGestureRecognizer *)gesture;