ソースを参照

Added placeholder sections for home screen.

Iñigo Valentin 9 年 前
コミット
7c2d2e5483

+ 8 - 0
app.xcodeproj/project.pbxproj

@@ -17,6 +17,8 @@
 		93D9EA601DE271E700089002 /* Section.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93D9EA5F1DE271E700089002 /* Section.xib */; };
 		93D9EA641DE273FD00089002 /* Section.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA631DE273FD00089002 /* Section.swift */; };
 		93D9EA681DE342AC00089002 /* UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA671DE342AC00089002 /* UIView.swift */; };
+		93D9EA6A1DE3491100089002 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA691DE3491100089002 /* HomeView.swift */; };
+		93D9EA6C1DE3498500089002 /* HomeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93D9EA6B1DE3498500089002 /* HomeView.xib */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -32,6 +34,8 @@
 		93D9EA5F1DE271E700089002 /* Section.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = Section.xib; path = ../Section.xib; sourceTree = "<group>"; };
 		93D9EA631DE273FD00089002 /* Section.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Section.swift; sourceTree = "<group>"; };
 		93D9EA671DE342AC00089002 /* UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIView.swift; sourceTree = "<group>"; };
+		93D9EA691DE3491100089002 /* HomeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
+		93D9EA6B1DE3498500089002 /* HomeView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeView.xib; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -73,7 +77,9 @@
 				93B84BA81D9C31AB006C0F67 /* Info.plist */,
 				93B84BA01D9C31AB006C0F67 /* app.xcdatamodeld */,
 				93D9EA5F1DE271E700089002 /* Section.xib */,
+				93D9EA6B1DE3498500089002 /* HomeView.xib */,
 				93D9EA631DE273FD00089002 /* Section.swift */,
+				93D9EA691DE3491100089002 /* HomeView.swift */,
 				93D9EA671DE342AC00089002 /* UIView.swift */,
 			);
 			path = app;
@@ -143,6 +149,7 @@
 				93D9EA601DE271E700089002 /* Section.xib in Resources */,
 				93B84BA41D9C31AB006C0F67 /* Assets.xcassets in Resources */,
 				93B84B9F1D9C31AB006C0F67 /* Main.storyboard in Resources */,
+				93D9EA6C1DE3498500089002 /* HomeView.xib in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -154,6 +161,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				93D9EA641DE273FD00089002 /* Section.swift in Sources */,
+				93D9EA6A1DE3491100089002 /* HomeView.swift in Sources */,
 				93B84B9C1D9C31AB006C0F67 /* ViewController.swift in Sources */,
 				93B84B9A1D9C31AB006C0F67 /* AppDelegate.swift in Sources */,
 				93B84BA21D9C31AB006C0F67 /* app.xcdatamodeld in Sources */,

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


+ 3 - 43
app/Base.lproj/Main.storyboard

@@ -66,7 +66,7 @@
                                             <rect key="frame" x="0.0" y="0.0" width="100" height="50"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
-                                                <label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Home" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PbJ-gz-Ivz">
+                                                <label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Home" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PbJ-gz-Ivz">
                                                     <rect key="frame" x="6" y="5" width="100" height="40"/>
                                                     <color key="backgroundColor" red="0.85979589509999998" green="0.95012098089999997" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                                     <constraints>
@@ -77,7 +77,7 @@
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
-                                                <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ZNu-9N-o6K">
+                                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZNu-9N-o6K">
                                                     <rect key="frame" x="4" y="30" width="80" height="5"/>
                                                     <color key="backgroundColor" red="0.58073881930000004" green="0.8210679313" blue="0.99835759400000001" alpha="1" colorSpace="calibratedRGB"/>
                                                     <constraints>
@@ -196,50 +196,10 @@
                         <viewControllerLayoutGuide type="top" id="g5I-wK-I6c"/>
                         <viewControllerLayoutGuide type="bottom" id="Upn-3g-9US"/>
                     </layoutGuides>
-                    <view key="view" contentMode="scaleToFill" id="12o-6g-8cT">
+                    <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"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="37J-7E-Jw8">
-                                <rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
-                                <subviews>
-                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="ukX-Wu-wG2">
-                                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="380"/>
-                                        <subviews>
-                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Encuentranos" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OoK-6e-ste">
-                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                                <nil key="textColor"/>
-                                                <nil key="highlightedColor"/>
-                                            </label>
-                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZTJ-9u-buD" customClass="Section" customModule="app">
-                                                <rect key="frame" x="0.0" y="0.0" width="0.0" height="380"/>
-                                                <color key="backgroundColor" red="1" green="0.2617365491187772" blue="0.22632500519708976" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                            </view>
-                                        </subviews>
-                                        <constraints>
-                                            <constraint firstItem="ZTJ-9u-buD" firstAttribute="width" secondItem="ukX-Wu-wG2" secondAttribute="width" id="0DN-Cq-MF4"/>
-                                            <constraint firstItem="ZTJ-9u-buD" firstAttribute="height" secondItem="ukX-Wu-wG2" secondAttribute="height" id="bz3-Zx-oDX"/>
-                                            <constraint firstItem="OoK-6e-ste" firstAttribute="width" secondItem="ukX-Wu-wG2" secondAttribute="width" id="zqs-IC-trj"/>
-                                        </constraints>
-                                    </stackView>
-                                </subviews>
-                                <constraints>
-                                    <constraint firstItem="ukX-Wu-wG2" firstAttribute="width" secondItem="37J-7E-Jw8" secondAttribute="width" id="DuN-8C-0or"/>
-                                    <constraint firstItem="ukX-Wu-wG2" firstAttribute="height" secondItem="37J-7E-Jw8" secondAttribute="height" id="RkD-fP-8to"/>
-                                    <constraint firstAttribute="trailing" secondItem="ukX-Wu-wG2" secondAttribute="trailing" id="T4j-JG-JcH"/>
-                                    <constraint firstAttribute="bottom" secondItem="ukX-Wu-wG2" secondAttribute="bottom" id="URv-6U-zx6"/>
-                                    <constraint firstItem="ukX-Wu-wG2" firstAttribute="top" secondItem="37J-7E-Jw8" secondAttribute="top" id="VFk-uc-Ttt"/>
-                                    <constraint firstItem="ukX-Wu-wG2" firstAttribute="leading" secondItem="37J-7E-Jw8" secondAttribute="leading" id="yB0-VE-Rk2"/>
-                                </constraints>
-                            </scrollView>
-                        </subviews>
                         <color key="backgroundColor" red="0.9425276964" green="1" blue="0.35931510379999998" alpha="1" colorSpace="calibratedRGB"/>
-                        <constraints>
-                            <constraint firstItem="37J-7E-Jw8" firstAttribute="height" secondItem="12o-6g-8cT" secondAttribute="height" id="AeP-0y-it2"/>
-                            <constraint firstItem="37J-7E-Jw8" firstAttribute="width" secondItem="12o-6g-8cT" secondAttribute="width" id="Yp6-cZ-Fa6"/>
-                            <constraint firstItem="37J-7E-Jw8" firstAttribute="top" secondItem="12o-6g-8cT" secondAttribute="top" id="fXa-iH-KIg"/>
-                            <constraint firstItem="37J-7E-Jw8" firstAttribute="leading" secondItem="12o-6g-8cT" secondAttribute="leading" id="fga-yN-ljf"/>
-                        </constraints>
                     </view>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="jry-8b-RWd" userLabel="First Responder" sceneMemberID="firstResponder"/>

+ 40 - 0
app/HomeView.swift

@@ -0,0 +1,40 @@
+//
+//  HomeView.swift
+//  app
+//
+//  Created by Iñigo Valentin on 21/11/16.
+//  Copyright © 2016 Margolariak. All rights reserved.
+//
+
+import Foundation
+import UIKit
+class HomeView: UIView {
+    
+    @IBOutlet weak var container: UIView!
+    @IBOutlet weak var locationSection: Section!
+    @IBOutlet weak var lablancaSection: Section!
+    @IBOutlet weak var futureActivitiesSection: Section!
+    @IBOutlet weak var blogSection: Section!
+    @IBOutlet weak var gallerySection: Section!
+    @IBOutlet weak var pastActivitiesSection: Section!
+    @IBOutlet weak var socialSection: Section!
+    
+    required init?(coder aDecoder: NSCoder) {
+        
+        print("HomeView: init")
+        super.init(coder: aDecoder)
+        
+        Bundle.main.loadNibNamed("HomeView", owner: self, options: nil)
+        self.addSubview(container)
+        container.frame = self.bounds
+        
+        //Set titles
+        locationSection.setTitle(text: "Encuentranos")
+        lablancaSection.setTitle(text: "La Blanca")
+        futureActivitiesSection.setTitle(text: "Proximas actividades")
+        blogSection.setTitle(text: "Ultimos posts")
+        gallerySection.setTitle(text: "Ultimas fotos")
+        pastActivitiesSection.setTitle(text: "Ultimas actividades")
+        socialSection.setTitle(text: "Siguenos")
+    }
+}

+ 118 - 0
app/HomeView.xib

@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2657" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina3_5" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
+        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HomeView" customModule="app" customModuleProvider="target">
+            <connections>
+                <outlet property="blogSection" destination="uHa-Mu-U68" id="RUp-Jg-AxI"/>
+                <outlet property="container" destination="iN0-l3-epB" id="cfT-rm-jA0"/>
+                <outlet property="futureActivitiesSection" destination="FQo-nm-4Mo" id="TAU-5k-Sc5"/>
+                <outlet property="gallerySection" destination="v6A-Ya-esA" id="TPS-Ut-DK1"/>
+                <outlet property="lablancaSection" destination="9nu-j1-wGI" id="3eu-wW-jM4"/>
+                <outlet property="locationSection" destination="Ljm-NP-c4e" id="bCD-0M-vqb"/>
+                <outlet property="pastActivitiesSection" destination="fZk-r1-Tca" id="U8D-Sh-TpR"/>
+                <outlet property="socialSection" destination="dgk-s8-xje" id="Wyw-VJ-YaI"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Poy-ba-9jX">
+                    <rect key="frame" x="0.0" y="20" width="320" height="480"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ljm-NP-c4e" customClass="Section" customModule="app" customModuleProvider="target">
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="120"/>
+                            <color key="backgroundColor" red="0.7046612645" green="1" blue="0.65893771199999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="120" id="4XI-rg-Du1"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9nu-j1-wGI" customClass="Section" customModule="app" customModuleProvider="target">
+                            <rect key="frame" x="0.0" y="120" width="320" height="120"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="120" id="B0a-14-gfY"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FQo-nm-4Mo" customClass="Section" customModule="app" customModuleProvider="target">
+                            <rect key="frame" x="0.0" y="240" width="320" height="120"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="120" id="AJi-J2-weg"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uHa-Mu-U68" customClass="Section" customModule="app" customModuleProvider="target">
+                            <rect key="frame" x="0.0" y="360" width="320" height="120"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="120" id="bV3-sl-7SD"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="v6A-Ya-esA" customClass="Section" customModule="app" customModuleProvider="target">
+                            <rect key="frame" x="28" y="480" width="320" height="120"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="120" id="vSS-A6-4QV"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fZk-r1-Tca" customClass="Section" customModule="app" customModuleProvider="target">
+                            <rect key="frame" x="160" y="600" width="0.0" height="0.0"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="120" id="6SU-vG-oBN"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dgk-s8-xje" customClass="Section" customModule="app" customModuleProvider="target">
+                            <rect key="frame" x="83" y="600" width="320" height="15"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="120" id="9Ea-4y-vjH"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" red="0.60846421632124348" green="0.58038871196685571" blue="0.12541175828852164" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    <constraints>
+                        <constraint firstItem="FQo-nm-4Mo" firstAttribute="width" secondItem="Poy-ba-9jX" secondAttribute="width" id="000-Cy-wsR"/>
+                        <constraint firstItem="Ljm-NP-c4e" firstAttribute="top" secondItem="Poy-ba-9jX" secondAttribute="top" id="23E-en-DDi"/>
+                        <constraint firstItem="uHa-Mu-U68" firstAttribute="centerX" secondItem="Poy-ba-9jX" secondAttribute="centerX" id="4KD-jX-3eU"/>
+                        <constraint firstItem="dgk-s8-xje" firstAttribute="centerX" secondItem="Poy-ba-9jX" secondAttribute="centerX" id="5mi-n8-URM"/>
+                        <constraint firstItem="fZk-r1-Tca" firstAttribute="top" secondItem="v6A-Ya-esA" secondAttribute="bottom" id="63J-zm-eA8"/>
+                        <constraint firstItem="dgk-s8-xje" firstAttribute="top" secondItem="fZk-r1-Tca" secondAttribute="bottom" id="8YH-MM-1cR"/>
+                        <constraint firstItem="9nu-j1-wGI" firstAttribute="width" secondItem="Poy-ba-9jX" secondAttribute="width" id="D2d-eu-aQa"/>
+                        <constraint firstItem="dgk-s8-xje" firstAttribute="width" secondItem="Poy-ba-9jX" secondAttribute="width" id="J7B-uj-NKg"/>
+                        <constraint firstItem="Ljm-NP-c4e" firstAttribute="centerX" secondItem="Poy-ba-9jX" secondAttribute="centerX" id="T2f-t6-8Ax"/>
+                        <constraint firstItem="Ljm-NP-c4e" firstAttribute="width" secondItem="Poy-ba-9jX" secondAttribute="width" id="V7B-2e-Zlq"/>
+                        <constraint firstItem="v6A-Ya-esA" firstAttribute="centerX" secondItem="Poy-ba-9jX" secondAttribute="centerX" id="VCL-tk-qZ9"/>
+                        <constraint firstItem="FQo-nm-4Mo" firstAttribute="top" secondItem="9nu-j1-wGI" secondAttribute="bottom" id="ZV1-6F-w0q"/>
+                        <constraint firstItem="uHa-Mu-U68" firstAttribute="centerX" secondItem="Poy-ba-9jX" secondAttribute="centerX" id="aSc-0o-zFE"/>
+                        <constraint firstItem="uHa-Mu-U68" firstAttribute="top" secondItem="FQo-nm-4Mo" secondAttribute="bottom" id="ad9-hp-x4I"/>
+                        <constraint firstItem="FQo-nm-4Mo" firstAttribute="centerX" secondItem="Poy-ba-9jX" secondAttribute="centerX" id="aqE-NW-zTF"/>
+                        <constraint firstItem="9nu-j1-wGI" firstAttribute="centerX" secondItem="Poy-ba-9jX" secondAttribute="centerX" id="cWL-iF-ULd"/>
+                        <constraint firstItem="v6A-Ya-esA" firstAttribute="top" secondItem="uHa-Mu-U68" secondAttribute="bottom" id="hSf-46-xQk"/>
+                        <constraint firstItem="fZk-r1-Tca" firstAttribute="centerX" secondItem="Poy-ba-9jX" secondAttribute="centerX" id="iGW-Be-hEH"/>
+                        <constraint firstItem="9nu-j1-wGI" firstAttribute="top" secondItem="Ljm-NP-c4e" secondAttribute="bottom" id="pCk-kh-wha"/>
+                        <constraint firstItem="v6A-Ya-esA" firstAttribute="width" secondItem="Poy-ba-9jX" secondAttribute="width" id="r2z-Z1-yS5"/>
+                        <constraint firstItem="uHa-Mu-U68" firstAttribute="width" secondItem="Poy-ba-9jX" secondAttribute="width" id="rp2-BX-jNV"/>
+                    </constraints>
+                </scrollView>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="Poy-ba-9jX" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="91y-2B-LO2"/>
+                <constraint firstItem="Poy-ba-9jX" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="20" symbolic="YES" id="Oqf-OH-F61"/>
+                <constraint firstItem="Poy-ba-9jX" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" multiplier="2" id="lJf-Z7-Bcw"/>
+            </constraints>
+            <point key="canvasLocation" x="26" y="52"/>
+        </view>
+    </objects>
+</document>

+ 28 - 0
app/Section.swift

@@ -0,0 +1,28 @@
+//
+//  Section.swift
+//  app
+//
+//  Created by Iñigo Valentin on 21/11/16.
+//  Copyright © 2016 Margolariak. All rights reserved.
+//
+
+import Foundation
+import UIKit
+class Section: UIView {
+    
+    @IBOutlet weak var container: UIView!
+    @IBOutlet weak var title: UITextView!
+    @IBOutlet weak var content: UIView!
+    
+    required init?(coder aDecoder: NSCoder) {
+        super.init(coder: aDecoder)
+        
+        Bundle.main.loadNibNamed("Section", owner: self, options: nil)
+        self.addSubview(container)
+        container.frame = self.bounds
+    }
+    
+    func setTitle(text: String){
+        title.text = text
+    }
+}

+ 1 - 1
app/ViewController.swift

@@ -17,7 +17,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
     @IBOutlet weak var containerViewActivities: UIView!
     @IBOutlet weak var containerViewLablanca: UIView!
     @IBOutlet weak var containerViewLocation: UIView!
-    @IBOutlet weak var containerViewHome: UIView!
+    @IBOutlet weak var containerViewHome: HomeView!
     override func viewDidLoad() {
         
         //Hide all sections, except for the first one