Iñigo Valentin 9 лет назад
Родитель
Сommit
161249e3d1

BIN
app.xcodeproj/project.xcworkspace/xcuserdata/seavenois.xcuserdatad/UserInterfaceState.xcuserstate


+ 19 - 18
app/Base.lproj/Main.storyboard

@@ -104,38 +104,38 @@
                                     <outlet property="delegate" destination="BYZ-38-t0r" id="k4t-RF-DxW"/>
                                 </connections>
                             </collectionView>
-                            <containerView opaque="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FfD-xR-Ufj" userLabel="Container View Home">
-                                <rect key="frame" x="-2" y="0.0" width="0.0" height="380"/>
+                            <containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FfD-xR-Ufj" userLabel="Container View Home">
+                                <rect key="frame" x="0.0" y="110" width="320" height="458"/>
                                 <connections>
                                     <segue destination="aNc-O2-1Df" kind="embed" id="DGi-yn-SV1"/>
                                 </connections>
                             </containerView>
-                            <containerView opaque="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="T4H-Rn-I4y" userLabel="Container View Location">
-                                <rect key="frame" x="38" y="0.0" width="0.0" height="128"/>
+                            <containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T4H-Rn-I4y" userLabel="Container View Location">
+                                <rect key="frame" x="0.0" y="110" width="320" height="458"/>
                                 <connections>
                                     <segue destination="Xnt-cB-Rqv" kind="embed" id="tDq-Wx-d8o"/>
                                 </connections>
                             </containerView>
-                            <containerView opaque="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nhy-Gy-cgq" userLabel="Container View Lablanca">
-                                <rect key="frame" x="38" y="0.0" width="0.0" height="128"/>
+                            <containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nhy-Gy-cgq" userLabel="Container View Lablanca">
+                                <rect key="frame" x="0.0" y="110" width="320" height="458"/>
                                 <connections>
                                     <segue destination="BMN-HQ-lp2" kind="embed" id="pVd-Ff-B2f"/>
                                 </connections>
                             </containerView>
-                            <containerView opaque="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="T5i-d0-9I1" userLabel="Container View Activities">
-                                <rect key="frame" x="38" y="0.0" width="0.0" height="128"/>
+                            <containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T5i-d0-9I1" userLabel="Container View Activities">
+                                <rect key="frame" x="0.0" y="110" width="320" height="458"/>
                                 <connections>
                                     <segue destination="0Sj-kN-N7N" kind="embed" id="TI8-Fn-Xcz"/>
                                 </connections>
                             </containerView>
-                            <containerView opaque="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="p8H-ai-kTU" userLabel="Container View Blog">
-                                <rect key="frame" x="40" y="0.0" width="0.0" height="128"/>
+                            <containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p8H-ai-kTU" userLabel="Container View Blog">
+                                <rect key="frame" x="0.0" y="110" width="320" height="458"/>
                                 <connections>
                                     <segue destination="CT0-x2-ZHC" kind="embed" id="53Z-m9-zSG"/>
                                 </connections>
                             </containerView>
-                            <containerView opaque="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3r9-W6-dmf" userLabel="Container View Gallery">
-                                <rect key="frame" x="40" y="0.0" width="0.0" height="128"/>
+                            <containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3r9-W6-dmf" userLabel="Container View Gallery">
+                                <rect key="frame" x="0.0" y="110" width="320" height="458"/>
                                 <connections>
                                     <segue destination="Bxe-vP-zrv" kind="embed" id="ufh-fQ-2yF"/>
                                 </connections>
@@ -197,8 +197,9 @@
                         <viewControllerLayoutGuide type="bottom" id="Upn-3g-9US"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="12o-6g-8cT" customClass="HomeView" customModule="app" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="380"/>
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="458"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" red="0.60846421630000003" green="0.58038871199999997" blue="0.12541175830000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="jry-8b-RWd" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -214,7 +215,7 @@
                         <viewControllerLayoutGuide type="bottom" id="3Ws-3b-fnx"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="hp8-jo-hEx">
-                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="128"/>
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="458"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" red="1" green="0.055437682639999999" blue="0.9161184698" alpha="1" colorSpace="calibratedRGB"/>
                     </view>
@@ -232,7 +233,7 @@
                         <viewControllerLayoutGuide type="bottom" id="cDH-sf-Urh"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="XIc-19-qoq">
-                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="128"/>
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="458"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
@@ -250,7 +251,7 @@
                         <viewControllerLayoutGuide type="bottom" id="3Yd-97-laW"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="e8E-bp-zJI">
-                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="128"/>
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="458"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" red="0.4079896717" green="1" blue="0.34807942549999998" alpha="1" colorSpace="calibratedRGB"/>
                     </view>
@@ -268,7 +269,7 @@
                         <viewControllerLayoutGuide type="bottom" id="126-8G-plw"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="c4t-ul-w0Z">
-                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="128"/>
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="458"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" red="1" green="0.33842284866451022" blue="0.42972784824945376" alpha="1" colorSpace="calibratedRGB"/>
                     </view>
@@ -286,7 +287,7 @@
                         <viewControllerLayoutGuide type="bottom" id="tOB-l0-rCU"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="pPe-Xd-teA">
-                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="128"/>
+                        <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"/>
                     </view>

+ 2 - 0
app/HomeView.swift

@@ -53,6 +53,8 @@ class HomeView: UIView {
 		self.addSubview(container)
 		container.frame = self.bounds
 		
+
+		
 		//Set titles for each section
 		locationSection.setTitle(text: "Encuentranos")
 		lablancaSection.setTitle(text: "La Blanca")

+ 10 - 4
app/RowHomePastActivities.swift

@@ -50,12 +50,18 @@ Extension of UIView to be formatted as sections.
 	init(s: String, i: Int) {
 		//self.s = s
 		//self.i = i
-		super.init(frame: CGRect(x: 00, y: 350, width: 10, height: 10))
+		super.init(frame: CGRect(x: 00, y: 0, width: 100, height: 150))
 		Bundle.main.loadNibNamed("RowHomePastActivities", owner: self, options: nil)
 		self.addSubview(container)
-		//container.frame = CGRect(x: 20, y: 100, width: 10, height: 10)
-		container.bounds = self.bounds//CGRect(x: 20, y: 100, width: 10, height: 10)
-		//title.bounds = self.bounds
+		container.frame = CGRect(x: 20, y: 100, width: 100, height: 150)
+		//container.bounds = self.bounds//CGRect(x: 20, y: 100, width: 10, height: 10)
+		//title.frame = self.bounds
+		container.addSubview(title)
+		title.frame = CGRect(x: 30, y: 150, width: 80, height: 100)
+	}
+	
+	override init(frame: CGRect){
+		super.init(frame: frame)
 	}
 	
 	func setBounds(rect: CGRect){

+ 32 - 8
app/RowHomePastActivities.xib

@@ -6,6 +6,7 @@
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -22,36 +23,48 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <view alpha="0.55000000000000004" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2hI-rc-KPm" userLabel="Container">
-                    <rect key="frame" x="81" y="10" width="320" height="568"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wLM-VU-VYk" userLabel="Entry">
-                            <rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="144"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="bg" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bkz-DV-HVr" userLabel="Title">
-                                    <rect key="frame" x="0.0" y="0.0" width="240" height="16"/>
-                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="8"/>
                                     <color key="backgroundColor" red="0.7046612645" green="1" blue="0.65893771199999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                     <nil key="textColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="WSe-uz-Uhz" userLabel="Image">
-                                    <rect key="frame" x="0.0" y="8" width="82" height="111"/>
+                                    <rect key="frame" x="0.0" y="8" width="82" height="128"/>
                                     <constraints>
+                                        <constraint firstAttribute="width" constant="82" id="AAD-9E-g0I"/>
                                         <constraint firstAttribute="height" constant="128" id="lU5-Vi-wpM"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="f4E-5p-Bid" userLabel="Text">
                                     <rect key="frame" x="82" y="8" width="150" height="13"/>
-                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="13" id="P3K-Ep-nV1"/>
+                                    </constraints>
                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                     <nil key="textColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                             </subviews>
                             <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstItem="WSe-uz-Uhz" firstAttribute="centerY" secondItem="wLM-VU-VYk" secondAttribute="centerY" id="Hss-ZU-RvF"/>
+                                <constraint firstAttribute="trailing" secondItem="f4E-5p-Bid" secondAttribute="trailing" constant="88" id="SY4-tx-tGD"/>
+                                <constraint firstItem="WSe-uz-Uhz" firstAttribute="top" secondItem="Bkz-DV-HVr" secondAttribute="bottom" id="WRT-Ue-SMy"/>
+                                <constraint firstItem="WSe-uz-Uhz" firstAttribute="top" secondItem="f4E-5p-Bid" secondAttribute="top" id="XG7-8d-jb8"/>
+                                <constraint firstItem="WSe-uz-Uhz" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="topMargin" id="hug-jJ-gQm"/>
+                                <constraint firstItem="Bkz-DV-HVr" firstAttribute="leading" secondItem="WSe-uz-Uhz" secondAttribute="leading" id="iSX-2Y-HxN"/>
+                                <constraint firstItem="f4E-5p-Bid" firstAttribute="leading" secondItem="WSe-uz-Uhz" secondAttribute="trailing" id="lSw-Hz-Vr9"/>
+                                <constraint firstItem="Bkz-DV-HVr" firstAttribute="leading" secondItem="wLM-VU-VYk" secondAttribute="leading" id="pon-Cx-fHh"/>
+                                <constraint firstAttribute="trailing" secondItem="Bkz-DV-HVr" secondAttribute="trailing" id="u6N-aa-Ad6"/>
+                                <constraint firstItem="Bkz-DV-HVr" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" id="xaz-VM-PBl"/>
+                            </constraints>
                             <userDefinedRuntimeAttributes>
                                 <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
                                     <color key="value" red="0.0" green="0.0" blue="0.33810763890000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -66,6 +79,11 @@
                         </view>
                     </subviews>
                     <color key="backgroundColor" red="1" green="0.0" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    <constraints>
+                        <constraint firstItem="wLM-VU-VYk" firstAttribute="leading" secondItem="2hI-rc-KPm" secondAttribute="leading" id="COo-WD-1w9"/>
+                        <constraint firstItem="wLM-VU-VYk" firstAttribute="top" secondItem="2hI-rc-KPm" secondAttribute="top" id="XVB-II-0rK"/>
+                        <constraint firstItem="wLM-VU-VYk" firstAttribute="width" secondItem="2hI-rc-KPm" secondAttribute="width" id="jxF-AQ-Vkm"/>
+                    </constraints>
                     <userDefinedRuntimeAttributes>
                         <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
                             <color key="value" red="0.033257378472222224" green="0.0" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -77,6 +95,12 @@
                 </view>
             </subviews>
             <color key="backgroundColor" red="0.0" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="2hI-rc-KPm" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="VKl-d5-fJd"/>
+                <constraint firstAttribute="bottom" secondItem="2hI-rc-KPm" secondAttribute="bottom" id="cU8-H8-q3m"/>
+                <constraint firstItem="2hI-rc-KPm" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="dVg-F6-N4H"/>
+                <constraint firstItem="2hI-rc-KPm" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="uDg-Fu-bJw"/>
+            </constraints>
             <nil key="simulatedStatusBarMetrics"/>
             <splitViewDetailSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <userDefinedRuntimeAttributes>

+ 1 - 1
app/ViewController.swift

@@ -54,7 +54,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 		self.containerViewActivities.alpha = 0
 		self.containerViewBlog.alpha = 0
 		self.containerViewGallery.alpha = 0
-		
+				
 		print("ViewController:viewDidLoad()")
 		Sync()