浏览代码

Fixed width constraints in the blog and gallery section.

Iñigo Valentin 9 年之前
父节点
当前提交
a9fa97bf89
共有 4 个文件被更改,包括 30 次插入18 次删除
  1. 5 4
      Section.xib
  2. 15 8
      app/BlogView.xib
  3. 8 4
      app/GalleryView.xib
  4. 2 2
      app/Info.plist

+ 5 - 4
Section.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="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
@@ -21,11 +21,11 @@
             <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e7S-aL-6Ed" userLabel="Section">
+                <view contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="e7S-aL-6Ed" userLabel="Section">
                     <rect key="frame" x="10" y="10" width="355" height="647"/>
                     <subviews>
-                        <textView clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" text="Titulo" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="mYX-eR-Wot">
-                            <rect key="frame" x="0.0" y="0.0" width="375" height="30"/>
+                        <textView clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" text="Titulo" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="mYX-eR-Wot">
+                            <rect key="frame" x="0.0" y="0.0" width="355" height="27"/>
                             <color key="backgroundColor" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                             <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
@@ -39,6 +39,7 @@
                     <color key="backgroundColor" red="0.59607843140000005" green="0.7843137255" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                     <constraints>
                         <constraint firstItem="mYX-eR-Wot" firstAttribute="bottom" secondItem="hhU-TV-XGc" secondAttribute="top" id="0JC-9a-fRi" userLabel="Section_Title.bottom=Content.top"/>
+                        <constraint firstItem="mYX-eR-Wot" firstAttribute="width" secondItem="e7S-aL-6Ed" secondAttribute="width" id="0xY-43-c4D"/>
                         <constraint firstItem="mYX-eR-Wot" firstAttribute="trailing" secondItem="hhU-TV-XGc" secondAttribute="trailing" id="4VF-IP-46O" userLabel="Section_Title.trailing=Content.trailing"/>
                         <constraint firstItem="mYX-eR-Wot" firstAttribute="leading" secondItem="hhU-TV-XGc" secondAttribute="leading" id="5pZ-0J-Mc4"/>
                         <constraint firstItem="hhU-TV-XGc" firstAttribute="top" secondItem="e7S-aL-6Ed" secondAttribute="top" constant="27" id="GaL-O1-uum"/>

+ 15 - 8
app/BlogView.xib

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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="retina3_5" orientation="portrait">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina5_5" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
@@ -18,17 +18,17 @@
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" userLabel="Container">
-            <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
+            <rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V2d-fd-cjO">
-                    <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
+                    <rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
                     <subviews>
                         <stackView contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="Iqa-PQ-TOo">
-                            <rect key="frame" x="0.0" y="0.0" width="320" height="2200"/>
+                            <rect key="frame" x="0.0" y="0.0" width="414" height="2200"/>
                             <subviews>
-                                <view autoresizesSubviews="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xlt-p5-m6w" customClass="Section" customModule="app">
-                                    <rect key="frame" x="0.0" y="0.0" width="320" height="2200"/>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xlt-p5-m6w" customClass="Section" customModule="app">
+                                    <rect key="frame" x="0.0" y="0.0" width="414" height="2200"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="2200" id="dig-UC-mt1" userLabel="height = 2200"/>
                                     </constraints>
@@ -39,12 +39,16 @@
                                 <constraint firstItem="xlt-p5-m6w" firstAttribute="top" secondItem="Iqa-PQ-TOo" secondAttribute="top" id="ARG-5x-hIU"/>
                                 <constraint firstAttribute="bottom" secondItem="xlt-p5-m6w" secondAttribute="bottom" id="EIU-Wo-4hn"/>
                                 <constraint firstAttribute="height" constant="2200" id="FSh-mk-71J"/>
+                                <constraint firstItem="xlt-p5-m6w" firstAttribute="centerX" secondItem="Iqa-PQ-TOo" secondAttribute="centerX" id="cHf-jr-BYh"/>
+                                <constraint firstItem="xlt-p5-m6w" firstAttribute="width" secondItem="Iqa-PQ-TOo" secondAttribute="width" id="i9f-Kl-gsH"/>
                             </constraints>
                         </stackView>
                     </subviews>
                     <constraints>
                         <constraint firstItem="Iqa-PQ-TOo" firstAttribute="top" secondItem="V2d-fd-cjO" secondAttribute="top" id="JUm-Fl-IMw"/>
-                        <constraint firstAttribute="trailing" secondItem="Iqa-PQ-TOo" secondAttribute="trailing" id="NAr-lB-8Ty"/>
+                        <constraint firstItem="Iqa-PQ-TOo" firstAttribute="trailing" secondItem="V2d-fd-cjO" secondAttribute="trailing" id="NAr-lB-8Ty"/>
+                        <constraint firstItem="xlt-p5-m6w" firstAttribute="width" secondItem="V2d-fd-cjO" secondAttribute="width" id="beG-GV-zBi"/>
+                        <constraint firstItem="xlt-p5-m6w" firstAttribute="centerX" secondItem="V2d-fd-cjO" secondAttribute="centerX" id="tjw-ff-7cu"/>
                         <constraint firstItem="Iqa-PQ-TOo" firstAttribute="leading" secondItem="V2d-fd-cjO" secondAttribute="leading" id="wWa-rA-U3w"/>
                         <constraint firstAttribute="bottom" secondItem="Iqa-PQ-TOo" secondAttribute="bottom" id="x0w-9j-39f"/>
                     </constraints>
@@ -54,8 +58,11 @@
                 <constraint firstItem="V2d-fd-cjO" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="JsC-UU-8eB"/>
                 <constraint firstItem="V2d-fd-cjO" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" id="bBb-zb-kBf"/>
                 <constraint firstItem="V2d-fd-cjO" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="ddT-DW-Knz"/>
+                <constraint firstItem="Iqa-PQ-TOo" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="iYG-LX-UH4"/>
                 <constraint firstItem="V2d-fd-cjO" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="kdV-ei-kvf"/>
+                <constraint firstItem="Iqa-PQ-TOo" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="uJX-4Y-e2l"/>
             </constraints>
+            <point key="canvasLocation" x="35.5" y="53.5"/>
         </view>
     </objects>
 </document>

+ 8 - 4
app/GalleryView.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="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
@@ -25,10 +25,10 @@
                     <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                     <subviews>
                         <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"/>
+                            <rect key="frame" x="0.0" y="0.0" width="375" 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="320" height="3000"/>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3TY-0K-6q1" customClass="Section" customModule="app">
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="3000"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="3000" id="vPf-aG-EZ9"/>
                                     </constraints>
@@ -55,7 +55,11 @@
                 <constraint firstItem="aoy-Mh-gpR" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="53f-dW-QfI"/>
                 <constraint firstItem="aoy-Mh-gpR" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" id="JAc-a5-eSB"/>
                 <constraint firstItem="aoy-Mh-gpR" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="KbH-35-FjR"/>
+                <constraint firstItem="ULw-PH-L95" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Pmm-8v-Nel"/>
+                <constraint firstItem="3TY-0K-6q1" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="SuI-4Q-EhS"/>
                 <constraint firstItem="aoy-Mh-gpR" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="ftc-db-cKU"/>
+                <constraint firstItem="3TY-0K-6q1" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="uuX-zc-aKY"/>
+                <constraint firstItem="ULw-PH-L95" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="xne-RG-cs4"/>
             </constraints>
         </view>
     </objects>

+ 2 - 2
app/Info.plist

@@ -17,9 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
+	<string>0.0.1</string>
 	<key>CFBundleVersion</key>
-	<string>1</string>
+	<string>2</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>UILaunchStoryboardName</key>