Share MainFrameViewController between iOS and tvOS

This commit is contained in:
Cameron Gutman
2018-08-26 11:56:27 -07:00
parent f5b99b6b9c
commit 1ef5c87afc
6 changed files with 83 additions and 986 deletions

View File

@@ -69,6 +69,9 @@
}
- (void)viewDidDisappear:(BOOL)animated {
[_controllerSupport cleanup];
[UIApplication sharedApplication].idleTimerDisabled = NO;
[_streamMan stopStream];
if (_inactivityTimer != nil) {
[_inactivityTimer invalidate];
_inactivityTimer = nil;
@@ -77,8 +80,6 @@
}
- (void) returnToMainFrame {
[_controllerSupport cleanup];
[UIApplication sharedApplication].idleTimerDisabled = NO;
[self.navigationController popToRootViewControllerAnimated:YES];
}
@@ -100,7 +101,6 @@
- (void)inactiveTimerExpired:(NSTimer*)timer {
Log(LOG_I, @"Terminating stream after inactivity");
[_streamMan stopStream];
[self returnToMainFrame];
_inactivityTimer = nil;
@@ -124,14 +124,12 @@
_inactivityTimer = nil;
}
[_streamMan stopStream];
[self returnToMainFrame];
}
- (void)edgeSwiped {
Log(LOG_I, @"User swiped to end stream");
[_streamMan stopStream];
[self returnToMainFrame];
}