Commit 4e8f0648 authored by Felix Paul Kühne's avatar Felix Paul Kühne

ATV: improve and simplify cloud & open network navigation

parent 3c9994f6
...@@ -66,7 +66,9 @@ ...@@ -66,7 +66,9 @@
_mainViewController.tabBar.backgroundColor = [UIColor VLCOrangeTintColor]; _mainViewController.tabBar.backgroundColor = [UIColor VLCOrangeTintColor];
_mainViewController.viewControllers = @[[[UINavigationController alloc] initWithRootViewController:_localNetworkVC], _mainViewController.viewControllers = @[[[UINavigationController alloc] initWithRootViewController:_localNetworkVC],
_cloudServicesVC, _openNetworkVC, _aboutSettingsVC]; [[UINavigationController alloc] initWithRootViewController:_cloudServicesVC],
[[UINavigationController alloc] initWithRootViewController:_openNetworkVC],
_aboutSettingsVC];
self.window.rootViewController = _mainViewController; self.window.rootViewController = _mainViewController;
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
- (IBAction)dropbox:(id)sender - (IBAction)dropbox:(id)sender
{ {
if ([[VLCDropboxController sharedInstance] restoreFromSharedCredentials]) { if ([[VLCDropboxController sharedInstance] restoreFromSharedCredentials]) {
[self showDetailViewController:self.dropboxTableViewController sender:self]; [self.navigationController pushViewController:self.dropboxTableViewController animated:YES];
return; return;
} }
...@@ -69,12 +69,12 @@ ...@@ -69,12 +69,12 @@
- (IBAction)onedrive:(id)sender - (IBAction)onedrive:(id)sender
{ {
[self showDetailViewController:self.oneDriveTableViewController sender:self]; [self.navigationController pushViewController:self.oneDriveTableViewController animated:YES];
} }
- (IBAction)box:(id)sender - (IBAction)box:(id)sender
{ {
[self showDetailViewController:self.boxTableViewController sender:self]; [self.navigationController pushViewController:self.boxTableViewController animated:YES];
} }
@end @end
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="9527.1" systemVersion="15B42" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9525.1"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCCloudServicesTVViewController"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCCloudServicesTVViewController">
...@@ -14,16 +14,8 @@ ...@@ -14,16 +14,8 @@
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/> <rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Cloud Services" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B3D-nr-ofx">
<rect key="frame" x="714" y="26" width="493" height="91"/>
<animations/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hdP-Dp-Mn0"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hdP-Dp-Mn0">
<rect key="frame" x="810" y="329" width="301" height="86"/> <rect key="frame" x="810" y="329" width="301" height="86"/>
<animations/>
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/> <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
<state key="normal" title="Dropbox"/> <state key="normal" title="Dropbox"/>
<connections> <connections>
...@@ -32,13 +24,11 @@ ...@@ -32,13 +24,11 @@
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uaI-5Z-SJq"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uaI-5Z-SJq">
<rect key="frame" x="810" y="445" width="301" height="86"/> <rect key="frame" x="810" y="445" width="301" height="86"/>
<animations/>
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/> <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
<state key="normal" title="Google Drive"/> <state key="normal" title="Google Drive"/>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HPy-k8-PTt"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HPy-k8-PTt">
<rect key="frame" x="810" y="561" width="301" height="86"/> <rect key="frame" x="810" y="561" width="301" height="86"/>
<animations/>
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/> <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
<state key="normal" title="Box"/> <state key="normal" title="Box"/>
<connections> <connections>
...@@ -47,7 +37,6 @@ ...@@ -47,7 +37,6 @@
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gFm-4V-QFs"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gFm-4V-QFs">
<rect key="frame" x="810" y="677" width="301" height="86"/> <rect key="frame" x="810" y="677" width="301" height="86"/>
<animations/>
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/> <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
<state key="normal" title="OneDrive"/> <state key="normal" title="OneDrive"/>
<connections> <connections>
...@@ -55,16 +44,13 @@ ...@@ -55,16 +44,13 @@
</connections> </connections>
</button> </button>
</subviews> </subviews>
<animations/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstItem="uaI-5Z-SJq" firstAttribute="top" secondItem="hdP-Dp-Mn0" secondAttribute="bottom" constant="30" id="0Pp-jT-hyL"/> <constraint firstItem="uaI-5Z-SJq" firstAttribute="top" secondItem="hdP-Dp-Mn0" secondAttribute="bottom" constant="30" id="0Pp-jT-hyL"/>
<constraint firstItem="gFm-4V-QFs" firstAttribute="top" secondItem="HPy-k8-PTt" secondAttribute="bottom" constant="30" id="6Ds-Dz-j0d"/> <constraint firstItem="gFm-4V-QFs" firstAttribute="top" secondItem="HPy-k8-PTt" secondAttribute="bottom" constant="30" id="6Ds-Dz-j0d"/>
<constraint firstItem="HPy-k8-PTt" firstAttribute="width" secondItem="gFm-4V-QFs" secondAttribute="width" id="KGz-R5-SlU"/> <constraint firstItem="HPy-k8-PTt" firstAttribute="width" secondItem="gFm-4V-QFs" secondAttribute="width" id="KGz-R5-SlU"/>
<constraint firstItem="uaI-5Z-SJq" firstAttribute="centerX" secondItem="hdP-Dp-Mn0" secondAttribute="centerX" id="Mw8-qu-Vqj"/> <constraint firstItem="uaI-5Z-SJq" firstAttribute="centerX" secondItem="hdP-Dp-Mn0" secondAttribute="centerX" id="Mw8-qu-Vqj"/>
<constraint firstItem="B3D-nr-ofx" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="26" id="SDQ-jj-HrX"/>
<constraint firstItem="HPy-k8-PTt" firstAttribute="top" secondItem="uaI-5Z-SJq" secondAttribute="bottom" constant="30" id="YoM-LV-tnC"/> <constraint firstItem="HPy-k8-PTt" firstAttribute="top" secondItem="uaI-5Z-SJq" secondAttribute="bottom" constant="30" id="YoM-LV-tnC"/>
<constraint firstItem="B3D-nr-ofx" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="aLS-4B-lGn"/>
<constraint firstItem="uaI-5Z-SJq" firstAttribute="width" secondItem="HPy-k8-PTt" secondAttribute="width" id="eSY-0J-2hE"/> <constraint firstItem="uaI-5Z-SJq" firstAttribute="width" secondItem="HPy-k8-PTt" secondAttribute="width" id="eSY-0J-2hE"/>
<constraint firstItem="hdP-Dp-Mn0" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="329" id="g5n-EN-pyy"/> <constraint firstItem="hdP-Dp-Mn0" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="329" id="g5n-EN-pyy"/>
<constraint firstItem="uaI-5Z-SJq" firstAttribute="width" secondItem="hdP-Dp-Mn0" secondAttribute="width" id="gjb-7z-ngq"/> <constraint firstItem="uaI-5Z-SJq" firstAttribute="width" secondItem="hdP-Dp-Mn0" secondAttribute="width" id="gjb-7z-ngq"/>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="9058" systemVersion="14F1017" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="9527.1" systemVersion="15B42" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9048"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9525.1"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCOpenNetworkStreamTVViewController"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCOpenNetworkStreamTVViewController">
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<outlet property="playURLField" destination="dWa-3n-YCa" id="Eoe-vT-AuM"/> <outlet property="playURLField" destination="dWa-3n-YCa" id="Eoe-vT-AuM"/>
<outlet property="preferredFocusedView" destination="dWa-3n-YCa" id="0Ez-4Z-KFF"/> <outlet property="preferredFocusedView" destination="dWa-3n-YCa" id="0Ez-4Z-KFF"/>
<outlet property="previouslyPlayedStreamsTableView" destination="v0o-s0-Xaz" id="I1r-ie-lFf"/> <outlet property="previouslyPlayedStreamsTableView" destination="v0o-s0-Xaz" id="I1r-ie-lFf"/>
<outlet property="titleLabel" destination="SBQ-fX-9BB" id="ZOr-mb-B3l"/>
<outlet property="view" destination="iN0-l3-epB" id="Eym-vH-oyN"/> <outlet property="view" destination="iN0-l3-epB" id="Eym-vH-oyN"/>
</connections> </connections>
</placeholder> </placeholder>
...@@ -20,7 +19,7 @@ ...@@ -20,7 +19,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter URL to play" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dWa-3n-YCa"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter URL to play" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dWa-3n-YCa">
<rect key="frame" x="710" y="156" width="500" height="66"/> <rect key="frame" x="710" y="174" width="500" height="66"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="500" id="3fz-h4-cGU"/> <constraint firstAttribute="width" constant="500" id="3fz-h4-cGU"/>
<constraint firstAttribute="height" constant="66" id="hDw-hW-ont"/> <constraint firstAttribute="height" constant="66" id="hDw-hW-ont"/>
...@@ -32,7 +31,7 @@ ...@@ -32,7 +31,7 @@
</connections> </connections>
</textField> </textField>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="66" sectionHeaderHeight="40" sectionFooterHeight="40" translatesAutoresizingMaskIntoConstraints="NO" id="v0o-s0-Xaz"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="66" sectionHeaderHeight="40" sectionFooterHeight="40" translatesAutoresizingMaskIntoConstraints="NO" id="v0o-s0-Xaz">
<rect key="frame" x="183" y="301" width="1555" height="700"/> <rect key="frame" x="183" y="310" width="1555" height="700"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="1555" id="ELC-Ea-jpC"/> <constraint firstAttribute="width" constant="1555" id="ELC-Ea-jpC"/>
...@@ -43,12 +42,6 @@ ...@@ -43,12 +42,6 @@
<outlet property="delegate" destination="-1" id="osW-Kv-1VK"/> <outlet property="delegate" destination="-1" id="osW-Kv-1VK"/>
</connections> </connections>
</tableView> </tableView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Open Network Stream" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SBQ-fX-9BB">
<rect key="frame" x="597" y="26" width="728" height="91"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No recently played streams" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9hs-BK-cVI"> <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No recently played streams" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9hs-BK-cVI">
<rect key="frame" x="662" y="510" width="596" height="60"/> <rect key="frame" x="662" y="510" width="596" height="60"/>
<fontDescription key="fontDescription" type="system" pointSize="50"/> <fontDescription key="fontDescription" type="system" pointSize="50"/>
...@@ -56,18 +49,14 @@ ...@@ -56,18 +49,14 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstItem="SBQ-fX-9BB" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="26" id="Ahc-1g-v0c"/>
<constraint firstItem="dWa-3n-YCa" firstAttribute="top" secondItem="SBQ-fX-9BB" secondAttribute="bottom" constant="39" id="QP5-C5-l6C"/>
<constraint firstItem="SBQ-fX-9BB" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="VXg-dj-wUU"/>
<constraint firstItem="9hs-BK-cVI" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="WOA-cL-SLX"/> <constraint firstItem="9hs-BK-cVI" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="WOA-cL-SLX"/>
<constraint firstItem="v0o-s0-Xaz" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="elq-bO-Tb3"/> <constraint firstItem="v0o-s0-Xaz" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="elq-bO-Tb3"/>
<constraint firstItem="v0o-s0-Xaz" firstAttribute="top" secondItem="dWa-3n-YCa" secondAttribute="bottom" constant="79" id="jCe-Gz-82c"/> <constraint firstItem="v0o-s0-Xaz" firstAttribute="top" secondItem="dWa-3n-YCa" secondAttribute="bottom" constant="70" id="jCe-Gz-82c"/>
<constraint firstItem="9hs-BK-cVI" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="n8b-cY-wQE"/> <constraint firstItem="9hs-BK-cVI" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="n8b-cY-wQE"/>
<constraint firstItem="dWa-3n-YCa" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="oFS-xp-QJo"/> <constraint firstItem="dWa-3n-YCa" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="oFS-xp-QJo"/>
<constraint firstAttribute="bottom" secondItem="v0o-s0-Xaz" secondAttribute="bottom" constant="79" id="ydf-eT-5UK"/> <constraint firstAttribute="bottom" secondItem="v0o-s0-Xaz" secondAttribute="bottom" constant="70" id="ydf-eT-5UK"/>
</constraints> </constraints>
</view> </view>
</objects> </objects>
......
...@@ -113,8 +113,6 @@ ...@@ -113,8 +113,6 @@
// currently the case on the TV // currently the case on the TV
const BOOL singlePlayback = NO; const BOOL singlePlayback = NO;
[self didSelectItem:item index:row singlePlayback:singlePlayback]; [self didSelectItem:item index:row singlePlayback:singlePlayback];
} }
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment