Browse Source

Adjust Server browsing sizes to HIG 5 column grid
adjust server listing sizes to HIG 6 column grid
https://developer.apple.com/tvos/human-interface-guidelines/visual-design/#layout

Tobias Conradi 9 years ago
parent
commit
c988de3aee

+ 3 - 2
Apple-TV/VLCRemoteBrowsingCollectionViewController.xib

@@ -15,8 +15,9 @@
         <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" id="NUi-8f-W1D">
         <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" id="NUi-8f-W1D">
             <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" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-            <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="50" minimumInteritemSpacing="50" id="o9k-mG-llf">
-                <size key="itemSize" width="300" height="300"/>
+            <animations/>
+            <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="100" minimumInteritemSpacing="50" id="o9k-mG-llf">
+                <size key="itemSize" width="308" height="308"/>
                 <size key="headerReferenceSize" width="0.0" height="0.0"/>
                 <size key="headerReferenceSize" width="0.0" height="0.0"/>
                 <size key="footerReferenceSize" width="0.0" height="0.0"/>
                 <size key="footerReferenceSize" width="0.0" height="0.0"/>
                 <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
                 <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>

+ 6 - 6
Apple-TV/VLCRemoteBrowsingTVCell.xib

@@ -7,27 +7,27 @@
     <objects>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <collectionViewCell opaque="NO" multipleTouchEnabled="YES" contentMode="center" id="Q7n-Zw-Frg" customClass="VLCCloudStorageCollectionViewCell">
-            <rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
+        <collectionViewCell opaque="NO" multipleTouchEnabled="YES" contentMode="center" id="Q7n-Zw-Frg" customClass="VLCRemoteBrowsingTVCell">
+            <rect key="frame" x="0.0" y="0.0" width="308" height="308"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
             <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
-                <rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
+                <rect key="frame" x="0.0" y="0.0" width="308" height="308"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                 <subviews>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h3U-B3-AOa">
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h3U-B3-AOa">
-                        <rect key="frame" x="8" y="202" width="284" height="30"/>
+                        <rect key="frame" x="8" y="206" width="292" height="30"/>
                         <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
                         <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
                         <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                         <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                         <nil key="highlightedColor"/>
                     </label>
                     </label>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I51-60-pwl">
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I51-60-pwl">
-                        <rect key="frame" x="8" y="232" width="284" height="35"/>
+                        <rect key="frame" x="8" y="236" width="292" height="35"/>
                         <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
                         <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
                         <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                         <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                         <nil key="highlightedColor"/>
                     </label>
                     </label>
                     <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="500" verticalCompressionResistancePriority="500" placeholderIntrinsicWidth="300" placeholderIntrinsicHeight="169" adjustsImageWhenAncestorFocused="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tHQ-sR-zn4" customClass="VLCNetworkImageView">
                     <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="500" verticalCompressionResistancePriority="500" placeholderIntrinsicWidth="300" placeholderIntrinsicHeight="169" adjustsImageWhenAncestorFocused="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tHQ-sR-zn4" customClass="VLCNetworkImageView">
-                        <rect key="frame" x="0.0" y="35" width="300" height="142"/>
+                        <rect key="frame" x="0.0" y="35" width="308" height="146"/>
                         <constraints>
                         <constraints>
                             <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="100" id="8jq-kh-9sp"/>
                             <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="100" id="8jq-kh-9sp"/>
                             <constraint firstAttribute="width" secondItem="tHQ-sR-zn4" secondAttribute="height" multiplier="19:9" id="TP3-nW-8dd"/>
                             <constraint firstAttribute="width" secondItem="tHQ-sR-zn4" secondAttribute="height" multiplier="19:9" id="TP3-nW-8dd"/>

+ 3 - 2
Apple-TV/VLCServerListTVViewController.m

@@ -51,8 +51,9 @@
     self.edgesForExtendedLayout = UIRectEdgeAll ^ UIRectEdgeTop;
     self.edgesForExtendedLayout = UIRectEdgeAll ^ UIRectEdgeTop;
 
 
     UICollectionViewFlowLayout *flowLayout = (UICollectionViewFlowLayout *)self.collectionViewLayout;
     UICollectionViewFlowLayout *flowLayout = (UICollectionViewFlowLayout *)self.collectionViewLayout;
-    flowLayout.itemSize = CGSizeMake(200, 300);
-
+    flowLayout.itemSize = CGSizeMake(250.0, 300.0);
+    flowLayout.minimumInteritemSpacing = 48.0;
+    flowLayout.minimumLineSpacing = 100.0;
 
 
     _nothingFoundLabel = [[UILabel alloc] init];
     _nothingFoundLabel = [[UILabel alloc] init];
     _nothingFoundLabel.text = NSLocalizedString(@"NO_SERVER_FOUND", nil);
     _nothingFoundLabel.text = NSLocalizedString(@"NO_SERVER_FOUND", nil);