mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 02:20:53 +00:00
Add current host name button
Add re-select host button and show current host name.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
@interface MainFrameViewController : UICollectionViewController <MDNSCallback, PairCallback, HostCallback, AppCallback, AppAssetCallback, NSURLConnectionDelegate, SWRevealViewControllerDelegate>
|
||||
@property (strong, nonatomic) IBOutlet UIButton *limelightLogoButton;
|
||||
@property (weak, nonatomic) IBOutlet UIBarButtonItem *computerNameButton;
|
||||
|
||||
+ (StreamConfiguration*) getStreamConfiguration;
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -46,9 +46,13 @@
|
||||
</state>
|
||||
</button>
|
||||
</barButtonItem>
|
||||
<barButtonItem key="rightBarButtonItem" id="KDy-JC-2sU">
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<connections>
|
||||
<outlet property="computerNameButton" destination="KDy-JC-2sU" id="Lkg-yz-GE6"/>
|
||||
<outlet property="limelightLogoButton" destination="Tiq-VS-Ua5" id="cue-NW-Hty"/>
|
||||
<segue destination="OIm-0n-i9v" kind="push" identifier="createStreamFrame" id="7gN-E7-Ips"/>
|
||||
</connections>
|
||||
|
||||
@@ -47,9 +47,13 @@
|
||||
</state>
|
||||
</button>
|
||||
</barButtonItem>
|
||||
<barButtonItem key="rightBarButtonItem" id="L1H-n4-HB7">
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<connections>
|
||||
<outlet property="computerNameButton" destination="L1H-n4-HB7" id="bng-Ky-oQs"/>
|
||||
<outlet property="limelightLogoButton" destination="pZ9-ft-T24" id="yRw-rK-9lQ"/>
|
||||
<segue destination="mI3-9F-XwU" kind="push" identifier="createStreamFrame" id="Vgc-B6-lvM"/>
|
||||
</connections>
|
||||
|
||||
Reference in New Issue
Block a user