Parcourir la source

Created files for La Blanca section.

Iñigo Valentin il y a 9 ans
Parent
commit
afac516ca2

+ 8 - 0
app.xcodeproj/project.pbxproj

@@ -26,6 +26,8 @@
 		936966EF1E9848D600A11055 /* RowAlbum.xib in Resources */ = {isa = PBXBuildFile; fileRef = 936966EE1E9848D600A11055 /* RowAlbum.xib */; };
 		936966F11E984B5000A11055 /* RowAlbum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 936966F01E984B5000A11055 /* RowAlbum.swift */; };
 		937EA02D1E5B8B5300D0893A /* UIApplcation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 937EA02C1E5B8B5300D0893A /* UIApplcation.swift */; };
+		938D211D1EA2275300C47EC3 /* LablancaView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 938D211C1EA2275300C47EC3 /* LablancaView.xib */; };
+		938D211F1EA2306300C47EC3 /* LablancaView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 938D211E1EA2306300C47EC3 /* LablancaView.swift */; };
 		93B408031D9ED44C000FBC99 /* MenuCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93B408021D9ED44C000FBC99 /* MenuCollectionViewCell.swift */; };
 		93B5C01A1E872B4B0069BFF8 /* RowHomeGallery.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93B5C0191E872B4B0069BFF8 /* RowHomeGallery.swift */; };
 		93B5C01C1E872B600069BFF8 /* RowHomeGallery.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93B5C01B1E872B600069BFF8 /* RowHomeGallery.xib */; };
@@ -71,6 +73,8 @@
 		936966EE1E9848D600A11055 /* RowAlbum.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowAlbum.xib; sourceTree = "<group>"; };
 		936966F01E984B5000A11055 /* RowAlbum.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowAlbum.swift; sourceTree = "<group>"; };
 		937EA02C1E5B8B5300D0893A /* UIApplcation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIApplcation.swift; sourceTree = "<group>"; };
+		938D211C1EA2275300C47EC3 /* LablancaView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LablancaView.xib; sourceTree = "<group>"; };
+		938D211E1EA2306300C47EC3 /* LablancaView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LablancaView.swift; sourceTree = "<group>"; };
 		93B408021D9ED44C000FBC99 /* MenuCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MenuCollectionViewCell.swift; path = ../MenuCollectionViewCell.swift; sourceTree = "<group>"; };
 		93B5C0191E872B4B0069BFF8 /* RowHomeGallery.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowHomeGallery.swift; sourceTree = "<group>"; };
 		93B5C01B1E872B600069BFF8 /* RowHomeGallery.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowHomeGallery.xib; sourceTree = "<group>"; };
@@ -172,6 +176,8 @@
 				936966EC1E98445200A11055 /* AlbumViewController.swift */,
 				936966EE1E9848D600A11055 /* RowAlbum.xib */,
 				936966F01E984B5000A11055 /* RowAlbum.swift */,
+				938D211C1EA2275300C47EC3 /* LablancaView.xib */,
+				938D211E1EA2306300C47EC3 /* LablancaView.swift */,
 			);
 			path = app;
 			sourceTree = "<group>";
@@ -246,6 +252,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				931AA5AE1E218D0E003A2290 /* Entry.xib in Resources */,
+				938D211D1EA2275300C47EC3 /* LablancaView.xib in Resources */,
 				93075C721E59D06900396389 /* RowBlog.xib in Resources */,
 				93B84BA71D9C31AB006C0F67 /* LaunchScreen.storyboard in Resources */,
 				93BAD2F61E586310009DF853 /* RowHomeSocial.xib in Resources */,
@@ -292,6 +299,7 @@
 				935D6E331E867C7E00CED3A1 /* RowGallery.swift in Sources */,
 				936966ED1E98445200A11055 /* AlbumViewController.swift in Sources */,
 				93D9EA681DE342AC00089002 /* UIView.swift in Sources */,
+				938D211F1EA2306300C47EC3 /* LablancaView.swift in Sources */,
 				93075C701E59D04A00396389 /* RowBlog.swift in Sources */,
 				93B408031D9ED44C000FBC99 /* MenuCollectionViewCell.swift in Sources */,
 				935D6E2F1E86792000CED3A1 /* GalleryView.swift in Sources */,

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

@@ -237,10 +237,10 @@
                         <viewControllerLayoutGuide type="top" id="dmp-DU-HeF"/>
                         <viewControllerLayoutGuide type="bottom" id="cDH-sf-Urh"/>
                     </layoutGuides>
-                    <view key="view" contentMode="scaleToFill" id="XIc-19-qoq">
+                    <view key="view" contentMode="scaleToFill" id="XIc-19-qoq" customClass="LablancaView" customModule="app">
                         <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"/>
+                        <color key="backgroundColor" red="0.70980392156862748" green="0.82745098039215681" blue="0.89803921568627454" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="L8G-JV-V2l" userLabel="First Responder" sceneMemberID="firstResponder"/>

+ 167 - 0
app/LablancaView.swift

@@ -0,0 +1,167 @@
+// Copyright (C) 2016 Inigo Valentin
+//
+// This file is part of the Gasteizko Margolariak IOS app.
+//
+// The Gasteizko Margolariak IOS app is free software: you can
+// redistribute it and/or modify it under the terms of the
+// GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your
+// option) any later version.
+//
+// The Gasteizko Margolariak IOS app is distributed in the
+// hope that it will be useful, but WITHOUT ANY WARRANTY;
+// without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+// Public License for more details.
+//
+// You should have received a copy of the GNU General Public
+// License along with the Gasteizko Margolariak IOS app.
+// If not, see <http://www.gnu.org/licenses/>.
+
+import Foundation
+import CoreData
+import UIKit
+/**
+Class to handle the home view.
+*/
+class LablancaView: UIView {
+
+	@IBOutlet var container: UIView!
+	
+	// App delegate
+	var delegate: AppDelegate? = nil
+	
+	// Section row list
+	//var rows: Array<RowGallery> = []
+	
+	/**
+	Run when the view is started.
+	*/
+	override init(frame: CGRect){
+		super.init(frame: frame)
+	}
+	
+	/**
+	Run when the view is started.
+	*/
+	required init?(coder aDecoder: NSCoder) {
+		
+		super.init(coder: aDecoder)
+		
+		NSLog(":LABLANCA:LOG: Init lablanca section.")
+
+		Bundle.main.loadNibNamed("LablancaView", owner: self, options: nil)
+		self.addSubview(container)
+		container.frame = self.bounds
+		//section.setTitle(text: "Gallery")
+		//let parent = section.getContentStack()
+		
+		// Get viewController from StoryBoard
+		let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
+		let controller = storyboard.instantiateViewController(withIdentifier: "GMViewController") as! ViewController
+		
+		// Show albums
+		/*let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
+		let appDelegate = UIApplication.shared.delegate as! AppDelegate
+		self.delegate = appDelegate
+		let lang : String = getLanguage()
+		context.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
+		let fetchRequest: NSFetchRequest<Album> = Album.fetchRequest()
+		let sortDescriptor = NSSortDescriptor(key: "time", ascending: false)
+		let sortDescriptors = [sortDescriptor]
+		fetchRequest.sortDescriptors = sortDescriptors
+		
+		do {
+			//Get the results
+			let searchResults = try context.fetch(fetchRequest)
+			
+			var row : RowGallery
+			var count = 0
+			var id: Int
+			var title: String
+			for r in searchResults as [NSManagedObject] {
+				count = count + 1
+				
+				//Create a new row
+				row = RowGallery.init(s: "rowGallery\(count)", i: count)
+				id = r.value(forKey: "id")! as! Int
+				
+				title = r.value(forKey: "title_\(lang)")! as! String
+				row.id = id
+				row.setTitle(text: title)
+				
+				// Get 4 random images from the album
+				let imgFetchRequest: NSFetchRequest<Photo_album> = Photo_album.fetchRequest()
+				// TODO Order random
+				//let imgSortDescriptor = NSSortDescriptor(key: "time", ascending: true)
+				//let imgSortDescriptors = [imgSortDescriptor]
+				//simgFetchRequest.sortDescriptors = imgSortDescriptors
+				imgFetchRequest.predicate = NSPredicate(format: "album == %i", id)
+				imgFetchRequest.fetchLimit = 4
+				do{
+					let imgSearchResults = try context.fetch(imgFetchRequest)
+					
+					// Loop images
+					var imageIdx = 0
+					for imgR in imgSearchResults as [NSManagedObject]{
+						
+						let imageId = imgR.value(forKey: "photo")! as! Int
+						
+						// For each image, I need a new query to fetch from photo entity.
+						let singleImgFetchRequest: NSFetchRequest<Photo> = Photo.fetchRequest()
+						singleImgFetchRequest.predicate = NSPredicate(format: "id == %i", imageId)
+						singleImgFetchRequest.fetchLimit = 4
+						do{
+							let singleImgSearchResults = try context.fetch(singleImgFetchRequest)
+							
+							// Loop image
+							for sImgR in singleImgSearchResults as [NSManagedObject]{
+								
+								let image = sImgR.value(forKey: "file")! as! String
+								row.setImage(idx: imageIdx, filename: image)
+							}
+							imageIdx = imageIdx + 1
+						}
+						catch {
+							NSLog(":GALLERY:ERROR: Error getting image from photo entity: \(error)")
+						}
+					}
+				} catch {
+					NSLog(":GALLERY:ERROR: Error getting image for album \(id): \(error)")
+				}
+				
+				parent.addArrangedSubview(row)
+				
+				// Add to the rows array
+				self.rows.append(row)
+				
+				
+				
+			}
+		} catch {
+			NSLog(":GALLERY:ERROR: Error with request: \(error)")
+		}
+		
+		//Always at the end: update scrollview
+		var h: Int = 0
+		for view in scrollView.subviews {
+			//contentRect = contentRect.union(view.frame);
+			h = h + Int(view.frame.height) + 30 //Why 30?
+		}
+		// TODO: Calculate at the end
+		self.scrollView.contentSize.height = 2500//CGFloat(h);
+		
+		self.setUpRowsTapRecognizers()
+		NSLog(":GALLERY:LOG: Finished loading gallery section.")*/
+	}
+	
+	func getLanguage() -> String{
+		let pre = NSLocale.preferredLanguages[0].subStr(start: 0, end: 1)
+		if(pre == "es" || pre == "en" || pre == "eu"){
+			return pre
+		}
+		else{
+			return "es"
+		}
+	}
+}

+ 189 - 0
app/LablancaView.xib

@@ -0,0 +1,189 @@
+<?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="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LablancaView" customModule="app">
+            <connections>
+                <outlet property="container" destination="iN0-l3-epB" id="ST9-WZ-eac"/>
+            </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="375" height="667"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tXE-yu-DoB">
+                    <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                    <subviews>
+                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="onh-i9-8Tz">
+                            <rect key="frame" x="20" y="0.0" width="375" height="667"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ANk-4K-DBn" userLabel="NoFestivals">
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" restorationIdentifier="NFTitle" text="NoFestivals" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rbu-EN-1UC" userLabel="NFTitle">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="30"/>
+                                            <color key="backgroundColor" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="30" id="Go6-nx-Txf"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="61P-J5-lJc">
+                                            <rect key="frame" x="-0.5" y="30" width="375" height="637"/>
+                                            <subviews>
+                                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fMm-Rh-0GJ">
+                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="637"/>
+                                                    <subviews>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No festivals" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JSe-pA-fF3">
+                                                            <rect key="frame" x="-0.5" y="0.0" width="375" height="20.5"/>
+                                                            <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="JSe-pA-fF3" firstAttribute="width" secondItem="fMm-Rh-0GJ" secondAttribute="width" id="0CL-R7-7P2"/>
+                                                        <constraint firstItem="JSe-pA-fF3" firstAttribute="top" secondItem="fMm-Rh-0GJ" secondAttribute="top" id="503-U7-fSe"/>
+                                                        <constraint firstItem="JSe-pA-fF3" firstAttribute="centerX" secondItem="fMm-Rh-0GJ" secondAttribute="centerX" id="bWM-TD-7eg"/>
+                                                    </constraints>
+                                                    <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
+                                                </view>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="fMm-Rh-0GJ" firstAttribute="width" secondItem="61P-J5-lJc" secondAttribute="width" id="1cf-fJ-wVQ"/>
+                                                <constraint firstItem="fMm-Rh-0GJ" firstAttribute="height" secondItem="61P-J5-lJc" secondAttribute="height" id="TW5-ca-9gB"/>
+                                                <constraint firstItem="fMm-Rh-0GJ" firstAttribute="centerY" secondItem="61P-J5-lJc" secondAttribute="centerY" id="bNf-OB-OIC"/>
+                                                <constraint firstItem="fMm-Rh-0GJ" firstAttribute="centerX" secondItem="61P-J5-lJc" secondAttribute="centerX" id="fUF-Fq-9fs"/>
+                                            </constraints>
+                                        </stackView>
+                                    </subviews>
+                                    <color key="backgroundColor" red="0.59607843137254901" green="0.78431372549019607" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstItem="rbu-EN-1UC" firstAttribute="width" secondItem="ANk-4K-DBn" secondAttribute="width" id="2rM-dk-8qK"/>
+                                        <constraint firstItem="61P-J5-lJc" firstAttribute="top" secondItem="rbu-EN-1UC" secondAttribute="bottom" id="8zQ-01-cy2"/>
+                                        <constraint firstItem="rbu-EN-1UC" firstAttribute="top" secondItem="ANk-4K-DBn" secondAttribute="top" id="EtJ-4V-V4H"/>
+                                        <constraint firstAttribute="bottom" secondItem="61P-J5-lJc" secondAttribute="bottom" id="H19-rV-6q8"/>
+                                        <constraint firstItem="rbu-EN-1UC" firstAttribute="centerX" secondItem="ANk-4K-DBn" secondAttribute="centerX" id="YlB-Dt-nSZ"/>
+                                        <constraint firstItem="61P-J5-lJc" firstAttribute="width" secondItem="ANk-4K-DBn" secondAttribute="width" id="c8o-RP-PLt"/>
+                                        <constraint firstItem="61P-J5-lJc" firstAttribute="centerX" secondItem="ANk-4K-DBn" secondAttribute="centerX" id="xOL-wr-htu"/>
+                                    </constraints>
+                                    <edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="borderRadius">
+                                            <integer key="value" value="8"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                            <color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                            <real key="value" value="1"/>
+                                        </userDefinedRuntimeAttribute>
+                                    </userDefinedRuntimeAttributes>
+                                </view>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O30-vI-Tga" userLabel="Festivals">
+                                    <rect key="frame" x="0.0" y="667" width="375" height="0.0"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" restorationIdentifier="FTitle" text="Festivals" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uf0-CR-dfk" userLabel="FTitle">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="30"/>
+                                            <color key="backgroundColor" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="30" id="sgD-kx-5ct"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="vY9-jJ-Xgr">
+                                            <rect key="frame" x="-1" y="30" width="375" height="637"/>
+                                            <subviews>
+                                                <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pV5-A2-Xaa">
+                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="637"/>
+                                                    <subviews>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Festivals" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="utC-Nz-3fI">
+                                                            <rect key="frame" x="-0.5" y="0.0" width="375" height="20.5"/>
+                                                            <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="utC-Nz-3fI" firstAttribute="top" secondItem="pV5-A2-Xaa" secondAttribute="top" id="1sh-Dr-fc5"/>
+                                                        <constraint firstItem="utC-Nz-3fI" firstAttribute="centerX" secondItem="pV5-A2-Xaa" secondAttribute="centerX" id="bgI-1V-BNb"/>
+                                                        <constraint firstItem="utC-Nz-3fI" firstAttribute="width" secondItem="pV5-A2-Xaa" secondAttribute="width" id="cCF-M8-q1m"/>
+                                                    </constraints>
+                                                    <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
+                                                </view>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="pV5-A2-Xaa" firstAttribute="centerY" secondItem="vY9-jJ-Xgr" secondAttribute="centerY" id="GC5-dP-bIQ"/>
+                                                <constraint firstItem="pV5-A2-Xaa" firstAttribute="centerX" secondItem="vY9-jJ-Xgr" secondAttribute="centerX" id="HXM-cF-zPU"/>
+                                                <constraint firstItem="pV5-A2-Xaa" firstAttribute="width" secondItem="vY9-jJ-Xgr" secondAttribute="width" id="m3u-Ho-G0K"/>
+                                                <constraint firstItem="pV5-A2-Xaa" firstAttribute="height" secondItem="vY9-jJ-Xgr" secondAttribute="height" id="n0w-A7-Mzf"/>
+                                            </constraints>
+                                        </stackView>
+                                    </subviews>
+                                    <color key="backgroundColor" red="0.59607843140000005" green="0.7843137255" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstItem="vY9-jJ-Xgr" firstAttribute="top" secondItem="Uf0-CR-dfk" secondAttribute="bottom" id="CIu-fW-2ke"/>
+                                        <constraint firstItem="vY9-jJ-Xgr" firstAttribute="width" secondItem="O30-vI-Tga" secondAttribute="width" id="Mpb-8s-DG6"/>
+                                        <constraint firstItem="vY9-jJ-Xgr" firstAttribute="centerX" secondItem="O30-vI-Tga" secondAttribute="centerX" id="RyB-bH-mXb"/>
+                                        <constraint firstItem="Uf0-CR-dfk" firstAttribute="width" secondItem="O30-vI-Tga" secondAttribute="width" id="Yxh-3l-W3m"/>
+                                        <constraint firstItem="Uf0-CR-dfk" firstAttribute="centerX" secondItem="O30-vI-Tga" secondAttribute="centerX" id="e5a-6x-1YS"/>
+                                        <constraint firstAttribute="bottom" secondItem="vY9-jJ-Xgr" secondAttribute="bottom" id="gTK-Kd-01Y"/>
+                                        <constraint firstItem="Uf0-CR-dfk" firstAttribute="top" secondItem="O30-vI-Tga" secondAttribute="top" id="uBb-uH-BIr"/>
+                                    </constraints>
+                                    <edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="borderRadius">
+                                            <integer key="value" value="8"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                            <color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                            <real key="value" value="1"/>
+                                        </userDefinedRuntimeAttribute>
+                                    </userDefinedRuntimeAttributes>
+                                </view>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="ANk-4K-DBn" firstAttribute="top" secondItem="onh-i9-8Tz" secondAttribute="top" id="2LN-GN-TQh"/>
+                                <constraint firstAttribute="bottom" secondItem="ANk-4K-DBn" secondAttribute="bottom" id="k0b-1J-wtl"/>
+                                <constraint firstItem="ANk-4K-DBn" firstAttribute="width" secondItem="onh-i9-8Tz" secondAttribute="width" id="l0Z-Zo-zKu"/>
+                                <constraint firstItem="ANk-4K-DBn" firstAttribute="height" secondItem="onh-i9-8Tz" secondAttribute="height" id="p4U-2o-goH"/>
+                                <constraint firstItem="ANk-4K-DBn" firstAttribute="centerX" secondItem="onh-i9-8Tz" secondAttribute="centerX" id="u5Q-Lj-phn"/>
+                            </constraints>
+                        </stackView>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="onh-i9-8Tz" firstAttribute="width" secondItem="tXE-yu-DoB" secondAttribute="width" id="77n-eX-stP"/>
+                        <constraint firstItem="onh-i9-8Tz" firstAttribute="leading" secondItem="tXE-yu-DoB" secondAttribute="leading" constant="20" symbolic="YES" id="ILl-Tx-lNZ"/>
+                        <constraint firstAttribute="bottom" secondItem="onh-i9-8Tz" secondAttribute="bottom" id="ai9-RL-mAr"/>
+                        <constraint firstItem="onh-i9-8Tz" firstAttribute="top" secondItem="tXE-yu-DoB" secondAttribute="top" id="crG-sr-Am8"/>
+                        <constraint firstAttribute="trailing" secondItem="onh-i9-8Tz" secondAttribute="trailing" id="fJF-UN-vGa"/>
+                        <constraint firstItem="onh-i9-8Tz" firstAttribute="height" secondItem="tXE-yu-DoB" secondAttribute="height" id="pDs-IV-ubt"/>
+                    </constraints>
+                </scrollView>
+            </subviews>
+            <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="tXE-yu-DoB" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="5nP-Qg-R0K"/>
+                <constraint firstItem="tXE-yu-DoB" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Adi-zS-UK6"/>
+                <constraint firstItem="tXE-yu-DoB" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="XCC-J5-qrD"/>
+                <constraint firstItem="tXE-yu-DoB" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" id="g1W-BK-3Nv"/>
+            </constraints>
+        </view>
+    </objects>
+</document>

+ 1 - 1
app/ViewController.swift

@@ -35,7 +35,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	@IBOutlet var containerViewGallery: GalleryView!
 	@IBOutlet var containerViewBlog: BlogView!
 	@IBOutlet var containerViewActivities: UIView!
-	@IBOutlet var containerViewLablanca: UIView!
+	@IBOutlet var containerViewLablanca: LablancaView!
 	@IBOutlet var containerViewLocation: UIView!
 	@IBOutlet var containerViewHome: HomeView!