Set the title of the view to the selected PC

This commit is contained in:
Cameron Gutman
2018-08-26 17:05:13 -07:00
parent 44f64e1a35
commit 109fa6f463
2 changed files with 14 additions and 0 deletions

View File

@@ -17,7 +17,9 @@
@interface MainFrameViewController : UICollectionViewController <DiscoveryCallback, PairCallback, HostCallback, AppCallback, AppAssetCallback, NSURLConnectionDelegate, SWRevealViewControllerDelegate>
#if !TARGET_OS_TV
@property (strong, nonatomic) IBOutlet UIButton *limelightLogoButton;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *computerNameButton;
#endif
@end

View File

@@ -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];
}