浏览代码

ATV: improve and simplify cloud & open network navigation

Felix Paul Kühne 9 年之前
父节点
当前提交
4e8f064820

+ 3 - 1
VLC for Apple TV/AppleTVAppDelegate.m

@@ -66,7 +66,9 @@
     _mainViewController.tabBar.backgroundColor = [UIColor VLCOrangeTintColor];
 
     _mainViewController.viewControllers = @[[[UINavigationController alloc] initWithRootViewController:_localNetworkVC],
-                                            _cloudServicesVC, _openNetworkVC, _aboutSettingsVC];
+                                            [[UINavigationController alloc] initWithRootViewController:_cloudServicesVC],
+                                            [[UINavigationController alloc] initWithRootViewController:_openNetworkVC],
+                                            _aboutSettingsVC];
 
     self.window.rootViewController = _mainViewController;
 

+ 3 - 3
VLC for Apple TV/VLCCloudServicesTVViewController.m

@@ -44,7 +44,7 @@
 - (IBAction)dropbox:(id)sender
 {
     if ([[VLCDropboxController sharedInstance] restoreFromSharedCredentials]) {
-        [self showDetailViewController:self.dropboxTableViewController sender:self];
+        [self.navigationController pushViewController:self.dropboxTableViewController animated:YES];
         return;
     }
 
@@ -69,12 +69,12 @@
 
 - (IBAction)onedrive:(id)sender
 {
-    [self showDetailViewController:self.oneDriveTableViewController sender:self];
+    [self.navigationController pushViewController:self.oneDriveTableViewController animated:YES];
 }
 
 - (IBAction)box:(id)sender
 {
-    [self showDetailViewController:self.boxTableViewController sender:self];
+    [self.navigationController pushViewController:self.boxTableViewController animated:YES];
 }
 
 @end

+ 2 - 16
VLC for Apple TV/VLCCloudServicesTVViewController.xib

@@ -1,7 +1,7 @@
 <?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>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9525.1"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCCloudServicesTVViewController">
@@ -14,16 +14,8 @@
             <rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <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">
                     <rect key="frame" x="810" y="329" width="301" height="86"/>
-                    <animations/>
                     <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
                     <state key="normal" title="Dropbox"/>
                     <connections>
@@ -32,13 +24,11 @@
                 </button>
                 <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"/>
-                    <animations/>
                     <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
                     <state key="normal" title="Google Drive"/>
                 </button>
                 <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"/>
-                    <animations/>
                     <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
                     <state key="normal" title="Box"/>
                     <connections>
@@ -47,7 +37,6 @@
                 </button>
                 <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"/>
-                    <animations/>
                     <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
                     <state key="normal" title="OneDrive"/>
                     <connections>
@@ -55,16 +44,13 @@
                     </connections>
                 </button>
             </subviews>
-            <animations/>
             <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
             <constraints>
                 <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="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="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="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="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"/>

+ 6 - 17
VLC for Apple TV/VLCOpenNetworkStreamTVViewController.xib

@@ -1,7 +1,7 @@
 <?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>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9048"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9525.1"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCOpenNetworkStreamTVViewController">
@@ -10,7 +10,6 @@
                 <outlet property="playURLField" destination="dWa-3n-YCa" id="Eoe-vT-AuM"/>
                 <outlet property="preferredFocusedView" destination="dWa-3n-YCa" id="0Ez-4Z-KFF"/>
                 <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"/>
             </connections>
         </placeholder>
@@ -20,7 +19,7 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <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">
-                    <rect key="frame" x="710" y="156" width="500" height="66"/>
+                    <rect key="frame" x="710" y="174" width="500" height="66"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="500" id="3fz-h4-cGU"/>
                         <constraint firstAttribute="height" constant="66" id="hDw-hW-ont"/>
@@ -32,7 +31,7 @@
                     </connections>
                 </textField>
                 <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"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="1555" id="ELC-Ea-jpC"/>
@@ -43,12 +42,6 @@
                         <outlet property="delegate" destination="-1" id="osW-Kv-1VK"/>
                     </connections>
                 </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">
                     <rect key="frame" x="662" y="510" width="596" height="60"/>
                     <fontDescription key="fontDescription" type="system" pointSize="50"/>
@@ -56,18 +49,14 @@
                     <nil key="highlightedColor"/>
                 </label>
             </subviews>
-            <animations/>
             <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
             <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="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="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>
         </view>
     </objects>

+ 0 - 2
VLC for Apple TV/VLCServerBrowsingTVTableViewController.m

@@ -113,8 +113,6 @@
     // currently the case on the TV
     const BOOL singlePlayback = NO;
     [self didSelectItem:item index:row singlePlayback:singlePlayback];
-
-
 }
 
 @end