mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-01 23:35:59 +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
|
- (void)viewDidAppear:(BOOL)animated
|
||||||
{
|
{
|
||||||
[super viewDidAppear:animated];
|
[super viewDidAppear:animated];
|
||||||
|
|
||||||
|
[[self revealViewController] setPrimaryViewController:self];
|
||||||
|
|
||||||
[self.navigationController setNavigationBarHidden:NO animated:YES];
|
[self.navigationController setNavigationBarHidden:NO animated:YES];
|
||||||
|
|
||||||
// Hide 1px border line
|
// Hide 1px border line
|
||||||
|
@ -180,6 +180,8 @@ typedef NS_ENUM(NSInteger, SWRevealToggleAnimationType)
|
|||||||
|
|
||||||
@interface SWRevealViewController : UIViewController
|
@interface SWRevealViewController : UIViewController
|
||||||
|
|
||||||
|
- (void)setPrimaryViewController:(UIViewController*)viewController;
|
||||||
|
|
||||||
/* Basic API */
|
/* Basic API */
|
||||||
|
|
||||||
// Object instance init and rear view setting
|
// Object instance init and rear view setting
|
||||||
|
@ -583,6 +583,7 @@ static CGFloat scaledValue( CGFloat v1, CGFloat min2, CGFloat max2, CGFloat min1
|
|||||||
FrontViewPosition _panInitialFrontPosition;
|
FrontViewPosition _panInitialFrontPosition;
|
||||||
NSMutableArray *_animationQueue;
|
NSMutableArray *_animationQueue;
|
||||||
BOOL _userInteractionStore;
|
BOOL _userInteractionStore;
|
||||||
|
UIViewController *_primaryViewController;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int FrontViewPositionNone = 0xff;
|
const int FrontViewPositionNone = 0xff;
|
||||||
@ -1364,6 +1365,26 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
_enqueue( [theSelf _performTransitionOperation:operation withViewController:newViewController animated:animated] );
|
_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
|
#pragma mark Animated view controller deployment and layout
|
||||||
|
|
||||||
|
@ -21,6 +21,13 @@
|
|||||||
StreamManager *_streamMan;
|
StreamManager *_streamMan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)viewDidAppear:(BOOL)animated
|
||||||
|
{
|
||||||
|
[super viewDidAppear:animated];
|
||||||
|
|
||||||
|
[[self revealViewController] setPrimaryViewController:self];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)viewDidLoad
|
- (void)viewDidLoad
|
||||||
{
|
{
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
@ -146,6 +153,11 @@
|
|||||||
// Dispose of any resources that can be recreated.
|
// Dispose of any resources that can be recreated.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Require a confirmation when streaming to activate a system gesture
|
||||||
|
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures {
|
||||||
|
return UIRectEdgeAll;
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL)shouldAutorotate {
|
- (BOOL)shouldAutorotate {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user