Add current host name button

Add re-select host button and show current host name.
This commit is contained in:
Yuki MIZUNO
2014-12-04 19:54:21 +09:00
parent 35dc4a7de3
commit d5c12a3eb6
4 changed files with 21 additions and 0 deletions

View File

@@ -70,11 +70,19 @@ static StreamConfiguration* streamConfig;
appList = [HttpManager getAppListFromXML:appListResp];
dispatch_async(dispatch_get_main_queue(), ^{
[self updateApps];
_computerNameButton.title = _selectedHost.displayName;
});
[AppManager retrieveAppAssets:appList withManager:hMan andCallback:self];
});
}
- (void)showHostSelectionView {
appList = [[NSArray alloc] init];
_computerNameButton.title = @"";
[self.collectionView reloadData];
[self.view addSubview:hostScrollView];
}
- (void) receivedAssetForApp:(App*)app {
[self.collectionView reloadData];
}
@@ -161,6 +169,10 @@ static StreamConfiguration* streamConfig;
// Set the side bar button action. When it's tapped, it'll show up the sidebar.
[_limelightLogoButton addTarget:self.revealViewController action:@selector(revealToggle:) forControlEvents:UIControlEventTouchDown];
// Set the host name button action. When it's tapped, it'll show up the host selection view.
[_computerNameButton setTarget:self];
[_computerNameButton setAction:@selector(showHostSelectionView)];
// Set the gesture
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];