mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-12 19:06:21 +00:00
Add settings button for tvOS
This commit is contained in:
@@ -714,6 +714,10 @@ static NSMutableSet* hostList;
|
||||
// if the user drags all the way off the screen opposite the settings pane.
|
||||
self.revealViewController.bounceBackOnOverdraw = NO;
|
||||
#else
|
||||
// The settings button will direct the user into the Settings app on tvOS
|
||||
[_settingsButton setTarget:self];
|
||||
[_settingsButton setAction:@selector(openTvSettings:)];
|
||||
|
||||
// Restore focus on the selected app on view controller pop navigation
|
||||
self.restoresFocusAfterTransition = NO;
|
||||
self.collectionView.remembersLastFocusedIndexPath = YES;
|
||||
@@ -762,6 +766,13 @@ static NSMutableSet* hostList;
|
||||
[self.view addSubview:hostScrollView];
|
||||
}
|
||||
|
||||
#if TARGET_OS_TV
|
||||
- (void)openTvSettings:(id)sender
|
||||
{
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
|
||||
}
|
||||
#endif
|
||||
|
||||
-(void)beginForegroundRefresh:(bool)refreshAppList
|
||||
{
|
||||
if (!_background) {
|
||||
|
||||
Reference in New Issue
Block a user