Преглед изворни кода

Gallery view layout correctly displayed.

Iñigo Valentin пре 9 година
родитељ
комит
cc5b52f59f
4 измењених фајлова са 27 додато и 28 уклоњено
  1. 1 1
      app/Base.lproj/Main.storyboard
  2. 4 8
      app/GalleryView.xib
  3. 2 2
      app/RowBlog.xib
  4. 20 17
      app/RowGallery.xib

+ 1 - 1
app/Base.lproj/Main.storyboard

@@ -293,7 +293,7 @@
                     <view key="view" contentMode="scaleToFill" id="pPe-Xd-teA" customClass="GalleryView" customModule="app" customModuleProvider="target">
                         <rect key="frame" x="0.0" y="0.0" width="320" height="458"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <color key="backgroundColor" red="0.70980392160000005" green="0.82745098039999998" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="2vc-bF-Qwf" userLabel="First Responder" sceneMemberID="firstResponder"/>

+ 4 - 8
app/GalleryView.xib

@@ -24,14 +24,13 @@
                 <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aoy-Mh-gpR">
                     <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                     <subviews>
-                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="ULw-PH-L95">
-                            <rect key="frame" x="0.0" y="0.0" width="360" height="1000"/>
+                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="ULw-PH-L95">
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="3000"/>
                             <subviews>
                                 <view autoresizesSubviews="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3TY-0K-6q1" customClass="Section" customModule="app">
-                                    <rect key="frame" x="0.0" y="0.0" width="360" height="1000"/>
-                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="3000"/>
                                     <constraints>
-                                        <constraint firstAttribute="height" constant="1000" id="vPf-aG-EZ9"/>
+                                        <constraint firstAttribute="height" constant="3000" id="vPf-aG-EZ9"/>
                                     </constraints>
                                     <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                                 </view>
@@ -39,9 +38,7 @@
                             <constraints>
                                 <constraint firstItem="3TY-0K-6q1" firstAttribute="top" secondItem="ULw-PH-L95" secondAttribute="top" id="0GM-gA-76X"/>
                                 <constraint firstItem="3TY-0K-6q1" firstAttribute="width" secondItem="ULw-PH-L95" secondAttribute="width" id="fZS-cn-vrg"/>
-                                <constraint firstAttribute="width" constant="360" id="hup-Kx-aQF"/>
                                 <constraint firstAttribute="bottom" secondItem="3TY-0K-6q1" secondAttribute="bottom" id="n9J-oi-jRF"/>
-                                <constraint firstAttribute="height" constant="1000" id="xuX-cU-pXu"/>
                             </constraints>
                         </stackView>
                     </subviews>
@@ -53,7 +50,6 @@
                     </constraints>
                 </scrollView>
             </subviews>
-            <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
                 <constraint firstItem="aoy-Mh-gpR" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="1sn-WI-SeL"/>
                 <constraint firstItem="aoy-Mh-gpR" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="53f-dW-QfI"/>

+ 2 - 2
app/RowBlog.xib

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16B2657" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
@@ -77,7 +77,7 @@
                     </subviews>
                     <constraints>
                         <constraint firstItem="b17-mq-rbm" firstAttribute="leading" secondItem="fIu-6X-Tsy" secondAttribute="leading" constant="10" id="09K-4S-bco"/>
-                        <constraint firstItem="b17-mq-rbm" firstAttribute="top" secondItem="fIu-6X-Tsy" secondAttribute="top" constant="10" id="DRs-NG-UKY"/>
+                        <constraint firstAttribute="top" secondItem="b17-mq-rbm" secondAttribute="top" constant="-10" id="DRs-NG-UKY"/>
                         <constraint firstAttribute="trailing" secondItem="b17-mq-rbm" secondAttribute="trailing" constant="10" id="Qtu-G3-8IH"/>
                         <constraint firstAttribute="height" constant="120" id="W85-Qc-MWb"/>
                         <constraint firstItem="b17-mq-rbm" firstAttribute="bottom" secondItem="fIu-6X-Tsy" secondAttribute="bottom" constant="10" id="bcY-vf-soX"/>

+ 20 - 17
app/RowGallery.xib

@@ -26,19 +26,20 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5s9-Le-qTP" userLabel="Container">
-                    <rect key="frame" x="-0.5" y="203" width="375" height="260"/>
+                    <rect key="frame" x="-0.5" y="183" width="375" height="300"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hif-f7-Vxg" userLabel="Entry">
-                            <rect key="frame" x="-10" y="-10" width="375" height="260"/>
+                            <rect key="frame" x="10" y="10" width="355" height="280"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0t2-77-n8R">
-                                    <rect key="frame" x="0.0" y="10" width="375" height="21"/>
+                                    <rect key="frame" x="0.0" y="10" width="355" height="21"/>
                                     <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
                                     <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="ALA-B7-xYr" userLabel="Photo0">
-                                    <rect key="frame" x="10" y="41" width="172.5" height="108"/>
+                                    <rect key="frame" x="10" y="41" width="162.5" height="108"/>
+                                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <userDefinedRuntimeAttributes>
                                         <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
                                             <color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -49,7 +50,8 @@
                                     </userDefinedRuntimeAttributes>
                                 </imageView>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="1yK-KV-day" userLabel="Photo1">
-                                    <rect key="frame" x="212.5" y="41" width="172.5" height="108"/>
+                                    <rect key="frame" x="182.5" y="41" width="162.5" height="108"/>
+                                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <userDefinedRuntimeAttributes>
                                         <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
                                             <real key="value" value="1"/>
@@ -60,7 +62,8 @@
                                     </userDefinedRuntimeAttributes>
                                 </imageView>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="FJP-ZD-LGA" userLabel="Photo2">
-                                    <rect key="frame" x="10" y="162" width="172.5" height="108"/>
+                                    <rect key="frame" x="10" y="162" width="162.5" height="108"/>
+                                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <userDefinedRuntimeAttributes>
                                         <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
                                             <color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -71,7 +74,8 @@
                                     </userDefinedRuntimeAttributes>
                                 </imageView>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="Xwd-Zx-bfE" userLabel="Photo3">
-                                    <rect key="frame" x="212.5" y="162" width="172.5" height="108"/>
+                                    <rect key="frame" x="182.5" y="162" width="162.5" height="108"/>
+                                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <userDefinedRuntimeAttributes>
                                         <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
                                             <color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -86,7 +90,7 @@
                             <constraints>
                                 <constraint firstItem="ALA-B7-xYr" firstAttribute="top" secondItem="0t2-77-n8R" secondAttribute="bottom" constant="10" id="0t2-P2-3gu"/>
                                 <constraint firstItem="FJP-ZD-LGA" firstAttribute="leading" secondItem="hif-f7-Vxg" secondAttribute="leading" constant="10" id="5bO-l4-LGu"/>
-                                <constraint firstItem="1yK-KV-day" firstAttribute="trailing" secondItem="0t2-77-n8R" secondAttribute="trailing" constant="10" id="DVh-LJ-p9e"/>
+                                <constraint firstItem="1yK-KV-day" firstAttribute="trailing" secondItem="0t2-77-n8R" secondAttribute="trailing" constant="-10" id="DVh-LJ-p9e"/>
                                 <constraint firstItem="ALA-B7-xYr" firstAttribute="width" secondItem="hif-f7-Vxg" secondAttribute="width" multiplier="0.5" constant="-15" id="FKW-tk-kAd"/>
                                 <constraint firstItem="FJP-ZD-LGA" firstAttribute="width" secondItem="hif-f7-Vxg" secondAttribute="width" multiplier="0.5" constant="-15" id="G3l-Qc-THc"/>
                                 <constraint firstItem="ALA-B7-xYr" firstAttribute="leading" secondItem="0t2-77-n8R" secondAttribute="leading" constant="10" id="HoJ-in-dXf"/>
@@ -94,11 +98,11 @@
                                 <constraint firstItem="Xwd-Zx-bfE" firstAttribute="width" secondItem="hif-f7-Vxg" secondAttribute="width" multiplier="0.5" constant="-15" id="QPQ-1R-oUR"/>
                                 <constraint firstItem="1yK-KV-day" firstAttribute="top" secondItem="0t2-77-n8R" secondAttribute="bottom" constant="10" id="Qxa-Ti-08x"/>
                                 <constraint firstItem="0t2-77-n8R" firstAttribute="top" secondItem="hif-f7-Vxg" secondAttribute="top" constant="10" id="WYO-vy-VPP"/>
-                                <constraint firstItem="FJP-ZD-LGA" firstAttribute="bottom" secondItem="hif-f7-Vxg" secondAttribute="bottom" constant="10" id="amo-wJ-6JX"/>
+                                <constraint firstItem="FJP-ZD-LGA" firstAttribute="bottom" secondItem="hif-f7-Vxg" secondAttribute="bottom" constant="-10" id="amo-wJ-6JX"/>
                                 <constraint firstItem="0t2-77-n8R" firstAttribute="width" secondItem="hif-f7-Vxg" secondAttribute="width" id="bDV-Kx-fRp"/>
-                                <constraint firstItem="Xwd-Zx-bfE" firstAttribute="bottom" secondItem="hif-f7-Vxg" secondAttribute="bottom" constant="10" id="hN9-fv-fa5"/>
+                                <constraint firstItem="Xwd-Zx-bfE" firstAttribute="bottom" secondItem="hif-f7-Vxg" secondAttribute="bottom" constant="-10" id="hN9-fv-fa5"/>
                                 <constraint firstItem="1yK-KV-day" firstAttribute="width" secondItem="0t2-77-n8R" secondAttribute="width" multiplier="0.5" constant="-15" id="mnN-Gq-pa3"/>
-                                <constraint firstItem="Xwd-Zx-bfE" firstAttribute="trailing" secondItem="hif-f7-Vxg" secondAttribute="trailing" constant="10" id="sfm-VE-DCx"/>
+                                <constraint firstItem="Xwd-Zx-bfE" firstAttribute="trailing" secondItem="hif-f7-Vxg" secondAttribute="trailing" constant="-10" id="sfm-VE-DCx"/>
                             </constraints>
                             <userDefinedRuntimeAttributes>
                                 <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
@@ -113,17 +117,16 @@
                             </userDefinedRuntimeAttributes>
                         </view>
                     </subviews>
-                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="260" id="7Yh-0e-ajC"/>
+                        <constraint firstAttribute="height" constant="300" id="7Yh-0e-ajC"/>
                         <constraint firstAttribute="bottom" secondItem="hif-f7-Vxg" secondAttribute="bottom" constant="10" id="KJt-VS-2f3"/>
-                        <constraint firstAttribute="trailing" secondItem="hif-f7-Vxg" secondAttribute="trailing" constant="10" id="dQW-pn-Jio"/>
-                        <constraint firstAttribute="top" secondItem="hif-f7-Vxg" secondAttribute="top" constant="10" id="hXG-tn-58e"/>
-                        <constraint firstAttribute="leading" secondItem="hif-f7-Vxg" secondAttribute="leading" constant="10" id="noN-5r-cCi"/>
+                        <constraint firstItem="hif-f7-Vxg" firstAttribute="trailing" secondItem="5s9-Le-qTP" secondAttribute="trailing" constant="-10" id="dQW-pn-Jio"/>
+                        <constraint firstAttribute="top" secondItem="hif-f7-Vxg" secondAttribute="top" constant="-10" id="hXG-tn-58e"/>
+                        <constraint firstItem="hif-f7-Vxg" firstAttribute="leading" secondItem="5s9-Le-qTP" secondAttribute="leading" constant="10" id="noN-5r-cCi"/>
                     </constraints>
+                    <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                 </view>
             </subviews>
-            <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
                 <constraint firstItem="5s9-Le-qTP" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="58W-bA-0zy"/>
                 <constraint firstItem="5s9-Le-qTP" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="96p-IK-UFf"/>