- fixed: memory leak and UI stuck caused by MenuSenctionView
- feat: memorize content offset for settings menu - optimize gesture passthrough for relative touch & absolute touch - feat: passthroughGesturesSwitch, ctrlDownForPinchSwitch, leftClickDelaySlider, touchModeSelector2 in experimental section
This commit is contained in:
@@ -310,11 +310,6 @@
|
||||
|
||||
}
|
||||
|
||||
- (void)handleAbsTouchPanGesture:(UIPanGestureRecognizer* )gesture{
|
||||
NSLog(@"handleAbsTouchPanGesture %f", CACurrentMediaTime());
|
||||
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT);
|
||||
}
|
||||
|
||||
- (void)configZoomGestureAndAddStreamView{
|
||||
if (_settings.touchMode.intValue == AbsoluteTouch) {
|
||||
if(!_scrollView) _scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];
|
||||
@@ -322,17 +317,17 @@
|
||||
[_scrollView.panGestureRecognizer setMinimumNumberOfTouches:2];
|
||||
[_scrollView.panGestureRecognizer setMaximumNumberOfTouches:2]; // reduce competing with keyboardToggleRecognizer in StreamView.
|
||||
#endif
|
||||
[_scrollView.panGestureRecognizer addTarget:self action:@selector(handleAbsTouchPanGesture:)];
|
||||
[_scrollView setShowsHorizontalScrollIndicator:NO];
|
||||
[_scrollView setShowsVerticalScrollIndicator:NO];
|
||||
[_scrollView setDelegate:self];
|
||||
[_scrollView setMaximumZoomScale:1.0f];
|
||||
[_scrollView setMaximumZoomScale:_settings.passthroughGestures ? 1.0 : 10.0f];
|
||||
if(!_mainFrameViewcontroller.settingsExpandedInStreamView){
|
||||
// Add StreamView inside a UIScrollView for absolute mode
|
||||
[_scrollView addSubview:_streamView];
|
||||
// Insert at index 0 to ensure it doesn't cover OSC controls (CALayers)
|
||||
[self.view insertSubview:_scrollView atIndex:0];
|
||||
}
|
||||
_scrollView.panGestureRecognizer.enabled = !_settings.passthroughGestures;
|
||||
}
|
||||
else{
|
||||
// Add streamView directly to self.view in other touch modes
|
||||
@@ -453,6 +448,7 @@
|
||||
[_streamView.onScreenControls sendInstance];
|
||||
|
||||
TouchPadGestureHandler.enablePinch = _settings.enablePinch;
|
||||
TouchPadGestureHandler.ctrlDownForPinch = _settings.ctrlDownForPinch;
|
||||
TouchPadGestureHandler.scrollSensitivity = _settings.scrollSensitivity.floatValue;
|
||||
TouchPadGestureHandler.pinchSensitivity = _settings.pinchSensitivity.floatValue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user