From 109fa6f463e3e89ce79493526658c4cc9428ba82 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 26 Aug 2018 17:05:13 -0700 Subject: [PATCH] Set the title of the view to the selected PC --- Limelight/ViewControllers/MainFrameViewController.h | 2 ++ Limelight/ViewControllers/MainFrameViewController.m | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Limelight/ViewControllers/MainFrameViewController.h b/Limelight/ViewControllers/MainFrameViewController.h index 1348b12..c6bcfba 100644 --- a/Limelight/ViewControllers/MainFrameViewController.h +++ b/Limelight/ViewControllers/MainFrameViewController.h @@ -17,7 +17,9 @@ @interface MainFrameViewController : UICollectionViewController +#if !TARGET_OS_TV @property (strong, nonatomic) IBOutlet UIButton *limelightLogoButton; @property (weak, nonatomic) IBOutlet UIBarButtonItem *computerNameButton; +#endif @end diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index e5361de..8d9573e 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -124,7 +124,11 @@ static NSMutableSet* hostList; return; } +#if TARGET_OS_TV + self.title = host.name; +#else self->_computerNameButton.title = host.name; +#endif [self.navigationController.navigationBar setNeedsLayout]; [self updateAppsForHost:host]; @@ -168,7 +172,11 @@ static NSMutableSet* hostList; return; } +#if TARGET_OS_TV + self.title = host.name; +#else self->_computerNameButton.title = host.name; +#endif [self.navigationController.navigationBar setNeedsLayout]; [self updateAppsForHost:host]; @@ -241,7 +249,11 @@ static NSMutableSet* hostList; [_appManager stopRetrieving]; _selectedHost = nil; +#if TARGET_OS_TV + self.title = @""; +#else _computerNameButton.title = @"No Host Selected"; +#endif [self.collectionView reloadData]; [self.view addSubview:hostScrollView]; }