Bladeren bron

Latest photos shown in the home screen.

Iñigo Valentin 9 jaren geleden
bovenliggende
commit
0c8773b988
2 gewijzigde bestanden met toevoegingen van 12 en 5 verwijderingen
  1. 4 4
      app/HomeView.xib
  2. 8 1
      app/RowHomeGallery.swift

+ 4 - 4
app/HomeView.xib

@@ -31,7 +31,7 @@
                     <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
                     <subviews>
                         <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="gOz-rr-CeQ">
-                            <rect key="frame" x="0.0" y="0.0" width="320" height="780"/>
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="930"/>
                             <subviews>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ljm-NP-c4e" customClass="Section" customModule="app">
                                     <rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
@@ -46,10 +46,10 @@
                                     <rect key="frame" x="0.0" y="180" width="320" height="50"/>
                                 </view>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="v6A-Ya-esA" customClass="Section" customModule="app" customModuleProvider="target">
-                                    <rect key="frame" x="0.0" y="240" width="320" height="50"/>
+                                    <rect key="frame" x="0.0" y="240" width="320" height="200"/>
                                 </view>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fZk-r1-Tca" customClass="Section" customModule="app">
-                                    <rect key="frame" x="0.0" y="300" width="320" height="350"/>
+                                    <rect key="frame" x="0.0" y="450" width="320" height="350"/>
                                     <userDefinedRuntimeAttributes>
                                         <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
                                             <real key="value" value="0.0"/>
@@ -57,7 +57,7 @@
                                     </userDefinedRuntimeAttributes>
                                 </view>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dgk-s8-xje" customClass="Section" customModule="app">
-                                    <rect key="frame" x="0.0" y="660" width="320" height="120"/>
+                                    <rect key="frame" x="0.0" y="810" width="320" height="120"/>
                                 </view>
                             </subviews>
                             <color key="backgroundColor" red="1" green="1" blue="0.42787000868055558" alpha="1" colorSpace="calibratedRGB"/>

+ 8 - 1
app/RowHomeGallery.swift

@@ -61,7 +61,14 @@ Extension of UIView to be formatted as sections.
 	init(s: String, i: Int) {
 		super.init(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
 		loadViewFromNib()
-		self.addSubview(self.container)
+		
+		self.frame = self.bounds
+		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		self.translatesAutoresizingMaskIntoConstraints = true
+		self.container.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		self.container.translatesAutoresizingMaskIntoConstraints = true
+		self.container.frame = self.bounds
+		self.addSubview(container)
 		
 		self.photos = [photo0, photo1, photo2, photo3]