mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-01 15:26:11 +00:00
Suppress system gesture detection during streaming
This commit is contained in:
parent
86f7112789
commit
d0d60b8ffc
@ -610,6 +610,9 @@ static NSMutableSet* hostList;
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
[[self revealViewController] setPrimaryViewController:self];
|
||||
|
||||
[self.navigationController setNavigationBarHidden:NO animated:YES];
|
||||
|
||||
// Hide 1px border line
|
||||
|
@ -180,6 +180,8 @@ typedef NS_ENUM(NSInteger, SWRevealToggleAnimationType)
|
||||
|
||||
@interface SWRevealViewController : UIViewController
|
||||
|
||||
- (void)setPrimaryViewController:(UIViewController*)viewController;
|
||||
|
||||
/* Basic API */
|
||||
|
||||
// Object instance init and rear view setting
|
||||
|
@ -583,6 +583,7 @@ static CGFloat scaledValue( CGFloat v1, CGFloat min2, CGFloat max2, CGFloat min1
|
||||
FrontViewPosition _panInitialFrontPosition;
|
||||
NSMutableArray *_animationQueue;
|
||||
BOOL _userInteractionStore;
|
||||
UIViewController *_primaryViewController;
|
||||
}
|
||||
|
||||
const int FrontViewPositionNone = 0xff;
|
||||
@ -1364,6 +1365,26 @@ const int FrontViewPositionNone = 0xff;
|
||||
_enqueue( [theSelf _performTransitionOperation:operation withViewController:newViewController animated:animated] );
|
||||
}
|
||||
|
||||
- (void)setPrimaryViewController:(UIViewController*)viewController
|
||||
{
|
||||
_primaryViewController = viewController;
|
||||
|
||||
// These are derived from the primary view controller
|
||||
if (@available(iOS 11.0, *)) {
|
||||
[self setNeedsUpdateOfHomeIndicatorAutoHidden];
|
||||
[self setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
|
||||
}
|
||||
}
|
||||
|
||||
- (UIViewController*)childViewControllerForHomeIndicatorAutoHidden
|
||||
{
|
||||
return _primaryViewController;
|
||||
}
|
||||
|
||||
- (UIViewController*)childViewControllerForScreenEdgesDeferringSystemGestures
|
||||
{
|
||||
return _primaryViewController;
|
||||
}
|
||||
|
||||
#pragma mark Animated view controller deployment and layout
|
||||
|
||||
|
@ -21,6 +21,13 @@
|
||||
StreamManager *_streamMan;
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
[[self revealViewController] setPrimaryViewController:self];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
@ -146,6 +153,11 @@
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
// Require a confirmation when streaming to activate a system gesture
|
||||
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures {
|
||||
return UIRectEdgeAll;
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotate {
|
||||
return YES;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user