Преглед изворни кода

Merge branch 'LaBlanca' into BaseProject

Iñigo Valentin пре 9 година
родитељ
комит
04c53f3f7b

+ 16 - 0
app.xcodeproj/project.pbxproj

@@ -15,6 +15,8 @@
 		931AA58B1E1DA911003A2290 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 931AA58A1E1DA910003A2290 /* CoreData.framework */; };
 		931AA5AE1E218D0E003A2290 /* Entry.xib in Resources */ = {isa = PBXBuildFile; fileRef = 931AA5AD1E218D0D003A2290 /* Entry.xib */; };
 		931AA5B01E219006003A2290 /* RowHomePastActivities.xib in Resources */ = {isa = PBXBuildFile; fileRef = 931AA5AF1E219006003A2290 /* RowHomePastActivities.xib */; };
+		9326C4F41EA51C39007DF2A4 /* RowLablancaDay.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9326C4F31EA51C39007DF2A4 /* RowLablancaDay.xib */; };
+		9326C4F61EA5279D007DF2A4 /* RowLablancaDay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9326C4F51EA5279D007DF2A4 /* RowLablancaDay.swift */; };
 		93294FF81E336FA000FDAF50 /* Entry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93294FF71E336FA000FDAF50 /* Entry.swift */; };
 		93294FFA1E337D0D00FDAF50 /* RowHomePastActivities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93294FF91E337D0D00FDAF50 /* RowHomePastActivities.swift */; };
 		935892D01E493C2300E1CD5F /* UIImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 935892CF1E493C2300E1CD5F /* UIImageView.swift */; };
@@ -26,6 +28,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 */; };
@@ -60,6 +64,8 @@
 		931AA58A1E1DA910003A2290 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
 		931AA5AD1E218D0D003A2290 /* Entry.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Entry.xib; sourceTree = "<group>"; };
 		931AA5AF1E219006003A2290 /* RowHomePastActivities.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowHomePastActivities.xib; sourceTree = "<group>"; };
+		9326C4F31EA51C39007DF2A4 /* RowLablancaDay.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowLablancaDay.xib; sourceTree = "<group>"; };
+		9326C4F51EA5279D007DF2A4 /* RowLablancaDay.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowLablancaDay.swift; sourceTree = "<group>"; };
 		93294FF71E336FA000FDAF50 /* Entry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Entry.swift; sourceTree = "<group>"; };
 		93294FF91E337D0D00FDAF50 /* RowHomePastActivities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowHomePastActivities.swift; sourceTree = "<group>"; };
 		935892CF1E493C2300E1CD5F /* UIImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageView.swift; sourceTree = "<group>"; };
@@ -71,6 +77,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 +180,10 @@
 				936966EC1E98445200A11055 /* AlbumViewController.swift */,
 				936966EE1E9848D600A11055 /* RowAlbum.xib */,
 				936966F01E984B5000A11055 /* RowAlbum.swift */,
+				938D211C1EA2275300C47EC3 /* LablancaView.xib */,
+				938D211E1EA2306300C47EC3 /* LablancaView.swift */,
+				9326C4F31EA51C39007DF2A4 /* RowLablancaDay.xib */,
+				9326C4F51EA5279D007DF2A4 /* RowLablancaDay.swift */,
 			);
 			path = app;
 			sourceTree = "<group>";
@@ -246,6 +258,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 */,
@@ -257,6 +270,7 @@
 				93B84BA41D9C31AB006C0F67 /* Assets.xcassets in Resources */,
 				935D6E2D1E8678B700CED3A1 /* GalleryView.xib in Resources */,
 				93BAD2EE1E585578009DF853 /* RowHomeBlog.xib in Resources */,
+				9326C4F41EA51C39007DF2A4 /* RowLablancaDay.xib in Resources */,
 				935D6E311E867C5E00CED3A1 /* RowGallery.xib in Resources */,
 				93B84B9F1D9C31AB006C0F67 /* Main.storyboard in Resources */,
 				93D9EA6C1DE3498500089002 /* HomeView.xib in Resources */,
@@ -278,6 +292,7 @@
 				93D9EA6A1DE3491100089002 /* HomeView.swift in Sources */,
 				93BEB6D21E7E878300C68DE5 /* PostViewController.swift in Sources */,
 				93BAD2F81E586741009DF853 /* RowHomeSocial.swift in Sources */,
+				9326C4F61EA5279D007DF2A4 /* RowLablancaDay.swift in Sources */,
 				93BAD2F01E585662009DF853 /* RowHomeBlog.swift in Sources */,
 				93294FFA1E337D0D00FDAF50 /* RowHomePastActivities.swift in Sources */,
 				93B5C01A1E872B4B0069BFF8 /* RowHomeGallery.swift in Sources */,
@@ -292,6 +307,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"/>

+ 194 - 0
app/LablancaView.swift

@@ -0,0 +1,194 @@
+// 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!			// Top container of the view.
+	@IBOutlet weak var nfWindow: UIView!		// The section to show when no festivals.
+	@IBOutlet weak var fWindow: UIView!			// The window to show while the festivals.
+	@IBOutlet weak var fTitle: UILabel!			// The title of the year festivals.
+	@IBOutlet weak var fImage: UIImageView!		// The festivals image
+	@IBOutlet weak var fText: UILabel!			// The festivals description.
+	@IBOutlet weak var fBtSchedule: UIButton!	// Button to show the city schedule.
+	@IBOutlet weak var fBtGMSchedule: UIButton!	// Button to show the Margolari schedule
+	@IBOutlet weak var fOfferList: UIStackView!	// Stack view to hold the offer list.
+	@IBOutlet weak var fDayList: UIStackView!	// Stack view to hold the single days price list.
+	
+	
+	
+	// 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
+		
+		// Get viewController from StoryBoard
+		let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
+		let controller = storyboard.instantiateViewController(withIdentifier: "GMViewController") as! ViewController
+		
+		// Read settings and show the required sections
+		let defaults = UserDefaults.standard
+		let festivals: Int = 1 //TODO defaults.integer(forKey: "festivals")
+		
+		if festivals == 1{
+			showFestivals()
+		}
+		else{
+			showNoFestivals()
+		}
+	}
+	
+	func showFestivals(){
+		NSLog(":LABLANCA:LOG: Showing festivals section.")
+		self.nfWindow.isHidden = true
+		
+		// TODO: Get current year
+		let year = 2016
+		
+		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
+		let appDelegate = UIApplication.shared.delegate as! AppDelegate
+		let lang : String = getLanguage()
+		context.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
+		
+		// Get info about festivals
+		let fetchRequest: NSFetchRequest<Festival> = Festival.fetchRequest()
+		fetchRequest.predicate = NSPredicate(format: "year = %i", year)
+		
+		do {
+			
+			// Get info from festivals
+			let searchResults = try context.fetch(fetchRequest)
+			let r = searchResults[0]
+			
+			// Set description
+			self.fText.text = r.value(forKey: "text_\(lang)") as! String?
+
+		} catch {
+			NSLog(":LABLANCA:ERROR: Error getting festivals info: \(error)")
+		}
+		
+		// Get info about the day prices.
+		let dateFormatter = DateFormatter()
+		dateFormatter.dateFormat = "yyyy-MM-dd"
+		dateFormatter.locale = Locale.init(identifier: "en_GB")
+		
+		// First date of year
+		var dateString = "\(year)-01-01"
+		let sDate = dateFormatter.date(from: dateString)
+		
+		// Last date of year
+		dateString = "\(year)-12-31"
+		let eDate = dateFormatter.date(from: dateString)
+		
+		// Get days
+		let dayFetchRequest: NSFetchRequest<Festival_day> = Festival_day.fetchRequest()
+		dayFetchRequest.predicate = NSPredicate(format: "(date >= %@) AND (date <= %@)", argumentArray: [sDate, eDate])
+		
+		do {
+			
+			// Get info from festivals
+			let daySearchResults = try context.fetch(dayFetchRequest)
+			
+			var row: RowLablancaDay
+			var count: Int = 0
+			
+			for day in daySearchResults as [NSManagedObject]{
+				
+				let date: NSDate = day.value(forKey: "date")! as! NSDate
+				let dateString: String = dateFormatter.string(from: date as Date)
+				let nDay: String = dateString.subStr(start: 8, end: 9)
+				let month: String = dateString.subStr(start: 5, end: 6)
+				var nMonth: String = "Agosto" // TODO: Reference
+				if month == "07"{
+					nMonth = "Julio" // TODO: Reference
+				}
+				let name: String = day.value(forKey: "name_\(lang)")! as! String
+				let price: Int = day.value(forKey: "price")! as! Int
+				
+				// Create the row and set data.
+				row = RowLablancaDay.init(s: "rowLablancaDay\(count)", i: count)
+				row.name.text = name
+				row.price.text = "\(price) €"
+				row.number.text = "\(Int(nDay)!)"
+				row.month.text = nMonth
+				
+				// Add the row
+				fDayList.addArrangedSubview(row)
+				row.setNeedsLayout()
+				row.layoutIfNeeded()
+				
+				// Hide the separator of the last row
+				if count == daySearchResults.count - 1 {
+					row.separator.isHidden = true
+				}
+				
+				count = count + 1
+			}
+			
+		} catch {
+			NSLog(":LABLANCA:ERROR: Error getting festival days info: \(error)")
+		}
+		
+		
+		
+	}
+	
+	func showNoFestivals(){
+		NSLog(":LABLANCA:LOG: Showing no festivals section.")
+		self.fWindow.isHidden = true
+		// Nothing else to be done.
+	}
+	
+	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"
+		}
+	}
+}

+ 407 - 0
app/LablancaView.xib

@@ -0,0 +1,407 @@
+<?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="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="LablancaView" customModule="app">
+            <connections>
+                <outlet property="container" destination="iN0-l3-epB" id="ST9-WZ-eac"/>
+                <outlet property="fBtGMSchedule" destination="sX5-OY-Jg0" id="mdf-kv-Msn"/>
+                <outlet property="fBtSchedule" destination="LqL-cc-rQ7" id="Vtj-4O-mS4"/>
+                <outlet property="fDayList" destination="qKn-wk-VDT" id="Eb2-oe-9fR"/>
+                <outlet property="fImage" destination="61f-V8-Jtw" id="UNp-gk-xTb"/>
+                <outlet property="fOfferList" destination="rcX-IS-Hmj" id="Y1a-Rq-6n2"/>
+                <outlet property="fText" destination="tlF-oW-fKA" id="LNb-2w-WMR"/>
+                <outlet property="fTitle" destination="Uf0-CR-dfk" id="uQa-yj-CK7"/>
+                <outlet property="fWindow" destination="O30-vI-Tga" id="I1G-s6-BsO"/>
+                <outlet property="nfWindow" destination="ANk-4K-DBn" id="Orc-2Z-DU4"/>
+            </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="0.0" y="0.0" width="375" height="1255.5"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1tl-Rf-vmM">
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="1255.5"/>
+                                    <subviews>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ANk-4K-DBn" userLabel="NoFestivals">
+                                            <rect key="frame" x="10" y="10" width="355" height="1235.5"/>
+                                            <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="355" 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.0" y="30" width="355" height="1205.5"/>
+                                                    <subviews>
+                                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fMm-Rh-0GJ">
+                                                            <rect key="frame" x="0.0" y="0.0" width="355" height="1205.5"/>
+                                                            <subviews>
+                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JSe-pA-fF3" userLabel="NFText">
+                                                                    <rect key="frame" x="8" y="8" width="339" height="1189.5"/>
+                                                                    <string key="text">Las Fiestas de La Blanca. Esos días, del 4 al 9 de agosto, en los que Vitoria-Gasteiz se transforma. Se llena de color y alegría, y en cada esquina puedes encontrar actividades y espectáculos.
+
+Nosotros, como cuadrilla de Blusas y Nescas, ya estamos trabajando en ello. Tan pronto como vayamos sabiendo más, aquí iremos publicando nuestro programa y otra información sobre las fiestas.
+
+Para ir abriendo boca, dejanos contarte algunas de las claves del plan Margolari de fiestas:
+Planes que se adaptan a tí: Puedes apuntarte días sueltos, o elegir entre las varias ofertas por varios días para conseguir descuentos.
+Dormir es de cobardes: Casi todos los días organizamos actividades desde la mañana, ya sean almuerzos, actividades para el público general o competiciones en los Herri Kirolak. Después solemos ir a comer juntos, antes de los paseillos, y después, siempre cenamos juntos. Y por la noche, hasta que el cuerpo aguante!
+Especialistas en paseillos: A la hora de hacer paseillos, no hay quien nos gane. Con nuestra furgoneta siempre abierta a la cabeza, y la txaranga El Postín animando desde atrás, es imposible aburrirse. Y entre paseillos tampoco descansamos, siempre estamos organizando cosas: juegos, carreras, bingos, música, ida a las barracas...
+Nos gusta comer: No queremos que un Margolari pase hambre. Las comidas en Gasteizko Margolariak son en restaurante, con un buen menú, que nos den fuerzas para aguantar el resto del día. Las cenas las hacemos bien en la calle o bien en restaurante, pero siempre con comida buena y caliente. Los mismo que los almuerzos.
+Y beber: Sea cual sea tu veneno, lo tenemos: Ron, vodka, kalimotxo, cerveza, whiskey, agua, refrescos... Durante los paseillos (y varias veces más a lo largo del día) en la furgoneta tendrás barra libre de todo lo que quieras.
+Nos apuntamos a un bombardeo: Carrera de Barricas, Herri Kirolak... Nunca hemos faltado a nada. Ganar, lo que es ganar, aún lo tenemos pendiente, pero lo pasamos bien. Así que ya sabes, si quieres representar a Gasteizko Margolariak, avísanos!
+Por la ciudad, para la ciudad: No nos gusta mirarnos el ombligo. Aunque la mayor parte de actividades que organizamos son para los miembros de Gasteizko Margolariak, hay otras que son para todo el público. Hasta ahora hemos organizado talleres de Cesta Punta para txikis, Margotxef (un concurso de cocina infantil), visitas a residencias de ancianos...
+Margolaris: Todo lo demás no sirve de nada si en una cuadrilla no hay buen ambiente. En Gasteizko Margolariak podemos presumir de gente cercana, participativa, capaz de hacer que desde el primer día ya te sientas como en casa. Además, los organizadores son gente cercana, que escucha y está siempre abierta a nuevas propuestas. Por esto, quien prueba, repite.</string>
+                                                                    <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" constant="-16" id="0CL-R7-7P2"/>
+                                                                <constraint firstItem="JSe-pA-fF3" firstAttribute="centerY" secondItem="fMm-Rh-0GJ" secondAttribute="centerY" id="Q89-f8-aOO"/>
+                                                                <constraint firstItem="JSe-pA-fF3" firstAttribute="centerX" secondItem="fMm-Rh-0GJ" secondAttribute="centerX" id="bWM-TD-7eg"/>
+                                                                <constraint firstItem="JSe-pA-fF3" firstAttribute="height" secondItem="fMm-Rh-0GJ" secondAttribute="height" constant="-16" id="v8i-dq-nKb"/>
+                                                            </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="cornerRadius">
+                                                    <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="10" y="10" width="355" height="1235.5"/>
+                                            <subviews>
+                                                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="zWn-KM-9py">
+                                                    <rect key="frame" x="0.0" y="0.0" width="355" height="1235.5"/>
+                                                    <subviews>
+                                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Trj-oS-RaI" userLabel="FestivalsIntro">
+                                                            <rect key="frame" x="0.0" y="0.0" width="355" height="300"/>
+                                                            <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="355" 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>
+                                                                <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="61f-V8-Jtw">
+                                                                    <rect key="frame" x="54" y="40" width="248" height="128"/>
+                                                                    <constraints>
+                                                                        <constraint firstAttribute="height" constant="128" id="V4f-jX-8vE"/>
+                                                                    </constraints>
+                                                                </imageView>
+                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tlF-oW-fKA">
+                                                                    <rect key="frame" x="8" y="178" width="339" height="122"/>
+                                                                    <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="Uf0-CR-dfk" firstAttribute="centerX" secondItem="Trj-oS-RaI" secondAttribute="centerX" id="5O9-6v-OI1"/>
+                                                                <constraint firstItem="tlF-oW-fKA" firstAttribute="centerX" secondItem="Trj-oS-RaI" secondAttribute="centerX" id="Bcv-eN-x8B"/>
+                                                                <constraint firstAttribute="bottom" secondItem="tlF-oW-fKA" secondAttribute="bottom" id="EHV-kx-BN2"/>
+                                                                <constraint firstItem="61f-V8-Jtw" firstAttribute="top" secondItem="Uf0-CR-dfk" secondAttribute="bottom" constant="10" id="GQH-En-4OI"/>
+                                                                <constraint firstItem="tlF-oW-fKA" firstAttribute="width" secondItem="Trj-oS-RaI" secondAttribute="width" constant="-16" id="JA6-j0-5rF"/>
+                                                                <constraint firstAttribute="height" constant="300" id="JPq-O2-Eee"/>
+                                                                <constraint firstItem="tlF-oW-fKA" firstAttribute="top" secondItem="61f-V8-Jtw" secondAttribute="bottom" constant="10" id="JyT-sH-rLA"/>
+                                                                <constraint firstItem="61f-V8-Jtw" firstAttribute="centerX" secondItem="Trj-oS-RaI" secondAttribute="centerX" id="MPp-Uj-J5D"/>
+                                                                <constraint firstItem="Uf0-CR-dfk" firstAttribute="width" secondItem="Trj-oS-RaI" secondAttribute="width" id="hig-ZM-Oul"/>
+                                                                <constraint firstItem="61f-V8-Jtw" firstAttribute="width" secondItem="Trj-oS-RaI" secondAttribute="width" multiplier="0.7" id="kTa-D1-266"/>
+                                                                <constraint firstItem="Uf0-CR-dfk" firstAttribute="top" secondItem="Trj-oS-RaI" secondAttribute="top" id="ljp-1E-Lap"/>
+                                                            </constraints>
+                                                            <userDefinedRuntimeAttributes>
+                                                                <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>
+                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                                    <real key="value" value="8"/>
+                                                                </userDefinedRuntimeAttribute>
+                                                            </userDefinedRuntimeAttributes>
+                                                        </view>
+                                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Et3-gn-ciE" userLabel="FestivalsButtons">
+                                                            <rect key="frame" x="0.0" y="310" width="355" height="90"/>
+                                                            <subviews>
+                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" restorationIdentifier="FesivalsButtonTitle" text=" Programas de Fiestas" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w8k-rj-iYK" userLabel="FesivalsButtonTitle">
+                                                                    <rect key="frame" x="0.0" y="0.0" width="355" 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="jb7-xf-xmS"/>
+                                                                    </constraints>
+                                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
+                                                                    <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                                    <nil key="highlightedColor"/>
+                                                                </label>
+                                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LqL-cc-rQ7" userLabel="BtSchedule">
+                                                                    <rect key="frame" x="10" y="40" width="162.5" height="40"/>
+                                                                    <color key="backgroundColor" red="0.070588235294117646" green="0.27058823529411763" blue="0.40392156862745099" alpha="1" colorSpace="calibratedRGB"/>
+                                                                    <constraints>
+                                                                        <constraint firstAttribute="height" constant="40" id="K47-KO-8oN"/>
+                                                                    </constraints>
+                                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
+                                                                    <state key="normal" title="Programa de fiestas">
+                                                                        <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                                    </state>
+                                                                    <userDefinedRuntimeAttributes>
+                                                                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                                                            <real key="value" value="2"/>
+                                                                        </userDefinedRuntimeAttribute>
+                                                                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                                                            <color key="value" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                                        </userDefinedRuntimeAttribute>
+                                                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                                            <real key="value" value="4"/>
+                                                                        </userDefinedRuntimeAttribute>
+                                                                    </userDefinedRuntimeAttributes>
+                                                                </button>
+                                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sX5-OY-Jg0" userLabel="BtGMSchedule">
+                                                                    <rect key="frame" x="182.5" y="40" width="162.5" height="40"/>
+                                                                    <color key="backgroundColor" red="0.070588235289999995" green="0.27058823529999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/>
+                                                                    <constraints>
+                                                                        <constraint firstAttribute="height" constant="40" id="4YB-v3-Cwb"/>
+                                                                    </constraints>
+                                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
+                                                                    <state key="normal" title="Programa Margolari">
+                                                                        <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                                    </state>
+                                                                    <userDefinedRuntimeAttributes>
+                                                                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                                                            <color key="value" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                                        </userDefinedRuntimeAttribute>
+                                                                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                                                            <real key="value" value="2"/>
+                                                                        </userDefinedRuntimeAttribute>
+                                                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                                            <real key="value" value="4"/>
+                                                                        </userDefinedRuntimeAttribute>
+                                                                    </userDefinedRuntimeAttributes>
+                                                                </button>
+                                                            </subviews>
+                                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                            <constraints>
+                                                                <constraint firstAttribute="trailing" secondItem="sX5-OY-Jg0" secondAttribute="trailing" constant="10" id="4ZI-Ic-udM"/>
+                                                                <constraint firstItem="LqL-cc-rQ7" firstAttribute="top" secondItem="w8k-rj-iYK" secondAttribute="bottom" constant="10" id="6U5-ki-vCh"/>
+                                                                <constraint firstItem="w8k-rj-iYK" firstAttribute="top" secondItem="Et3-gn-ciE" secondAttribute="top" id="Eor-ww-lgP"/>
+                                                                <constraint firstItem="w8k-rj-iYK" firstAttribute="width" secondItem="Et3-gn-ciE" secondAttribute="width" id="JWv-RV-UNi"/>
+                                                                <constraint firstItem="w8k-rj-iYK" firstAttribute="centerX" secondItem="Et3-gn-ciE" secondAttribute="centerX" id="SFa-f4-np8"/>
+                                                                <constraint firstItem="LqL-cc-rQ7" firstAttribute="leading" secondItem="Et3-gn-ciE" secondAttribute="leading" constant="10" id="Sju-dg-kBM"/>
+                                                                <constraint firstItem="sX5-OY-Jg0" firstAttribute="width" secondItem="Et3-gn-ciE" secondAttribute="width" multiplier="0.5" constant="-15" id="mRb-Ng-Lhq"/>
+                                                                <constraint firstItem="LqL-cc-rQ7" firstAttribute="width" secondItem="Et3-gn-ciE" secondAttribute="width" multiplier="0.5" constant="-15" id="p0W-yy-k4Z"/>
+                                                                <constraint firstItem="sX5-OY-Jg0" firstAttribute="top" secondItem="w8k-rj-iYK" secondAttribute="bottom" constant="10" id="vP0-hV-IAL"/>
+                                                                <constraint firstAttribute="bottom" secondItem="LqL-cc-rQ7" secondAttribute="bottom" constant="10" id="yFw-lf-zhl"/>
+                                                            </constraints>
+                                                            <userDefinedRuntimeAttributes>
+                                                                <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>
+                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                                    <real key="value" value="8"/>
+                                                                </userDefinedRuntimeAttribute>
+                                                            </userDefinedRuntimeAttributes>
+                                                        </view>
+                                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="feb-ob-HAK" userLabel="FestivalsPrices">
+                                                            <rect key="frame" x="0.0" y="410" width="355" height="825.5"/>
+                                                            <subviews>
+                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Programas de Fiestas" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="swA-jU-3wo" userLabel="FesivalsPricesTitle">
+                                                                    <rect key="frame" x="0.0" y="0.0" width="355" 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="chr-L8-aT9"/>
+                                                                    </constraints>
+                                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
+                                                                    <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                                    <nil key="highlightedColor"/>
+                                                                </label>
+                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ofertas" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uns-Lv-yfZ">
+                                                                    <rect key="frame" x="8" y="40" width="339" height="20"/>
+                                                                    <constraints>
+                                                                        <constraint firstAttribute="height" constant="20" id="lCP-xA-gT6"/>
+                                                                    </constraints>
+                                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                    <nil key="textColor"/>
+                                                                    <nil key="highlightedColor"/>
+                                                                </label>
+                                                                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="rcX-IS-Hmj" userLabel="StackOffers">
+                                                                    <rect key="frame" x="13" y="70" width="330" height="200"/>
+                                                                    <constraints>
+                                                                        <constraint firstAttribute="height" constant="200" id="YNZ-ap-Ful"/>
+                                                                    </constraints>
+                                                                </stackView>
+                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Dias sueltos" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xp7-EC-6OW">
+                                                                    <rect key="frame" x="8" y="285" width="339" height="20.5"/>
+                                                                    <constraints>
+                                                                        <constraint firstAttribute="height" constant="20" id="Ecc-N8-k3S"/>
+                                                                    </constraints>
+                                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                    <nil key="textColor"/>
+                                                                    <nil key="highlightedColor"/>
+                                                                </label>
+                                                                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="qKn-wk-VDT" userLabel="StackDays">
+                                                                    <rect key="frame" x="12.5" y="315.5" width="330" height="510"/>
+                                                                    <constraints>
+                                                                        <constraint firstAttribute="height" constant="510" id="Hzw-0S-h69"/>
+                                                                    </constraints>
+                                                                </stackView>
+                                                            </subviews>
+                                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                            <constraints>
+                                                                <constraint firstItem="swA-jU-3wo" firstAttribute="top" secondItem="feb-ob-HAK" secondAttribute="top" id="7hg-wz-EVN"/>
+                                                                <constraint firstItem="xp7-EC-6OW" firstAttribute="top" secondItem="rcX-IS-Hmj" secondAttribute="bottom" constant="15" id="EiC-Rv-Dog"/>
+                                                                <constraint firstItem="xp7-EC-6OW" firstAttribute="width" secondItem="feb-ob-HAK" secondAttribute="width" constant="-16" id="Gg5-Ev-py5"/>
+                                                                <constraint firstItem="swA-jU-3wo" firstAttribute="width" secondItem="feb-ob-HAK" secondAttribute="width" id="Gj1-HV-kbf"/>
+                                                                <constraint firstItem="xp7-EC-6OW" firstAttribute="centerX" secondItem="feb-ob-HAK" secondAttribute="centerX" id="HFH-0V-hcn"/>
+                                                                <constraint firstItem="rcX-IS-Hmj" firstAttribute="width" secondItem="feb-ob-HAK" secondAttribute="width" constant="-25" id="LZk-qS-h9h"/>
+                                                                <constraint firstItem="uns-Lv-yfZ" firstAttribute="top" secondItem="swA-jU-3wo" secondAttribute="bottom" constant="10" id="MKr-Mb-eal"/>
+                                                                <constraint firstItem="swA-jU-3wo" firstAttribute="centerX" secondItem="feb-ob-HAK" secondAttribute="centerX" id="P9O-ov-JFT"/>
+                                                                <constraint firstAttribute="bottom" secondItem="qKn-wk-VDT" secondAttribute="bottom" id="QX5-ch-qgu"/>
+                                                                <constraint firstItem="qKn-wk-VDT" firstAttribute="top" secondItem="xp7-EC-6OW" secondAttribute="bottom" constant="10" id="Sux-3A-CZI"/>
+                                                                <constraint firstItem="uns-Lv-yfZ" firstAttribute="centerX" secondItem="feb-ob-HAK" secondAttribute="centerX" id="U1R-CZ-rX8"/>
+                                                                <constraint firstItem="qKn-wk-VDT" firstAttribute="width" secondItem="feb-ob-HAK" secondAttribute="width" constant="-25" id="ZqJ-Od-UHh"/>
+                                                                <constraint firstItem="rcX-IS-Hmj" firstAttribute="centerX" secondItem="feb-ob-HAK" secondAttribute="centerX" id="cse-q8-LIE"/>
+                                                                <constraint firstItem="qKn-wk-VDT" firstAttribute="centerX" secondItem="feb-ob-HAK" secondAttribute="centerX" id="gFE-CG-zYE"/>
+                                                                <constraint firstItem="uns-Lv-yfZ" firstAttribute="width" secondItem="feb-ob-HAK" secondAttribute="width" constant="-16" id="h4H-Rv-cUV"/>
+                                                                <constraint firstItem="rcX-IS-Hmj" firstAttribute="top" secondItem="uns-Lv-yfZ" secondAttribute="bottom" constant="10" id="vx7-Lg-abI"/>
+                                                            </constraints>
+                                                            <userDefinedRuntimeAttributes>
+                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                                    <real key="value" value="8"/>
+                                                                </userDefinedRuntimeAttribute>
+                                                                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                                                    <real key="value" value="1"/>
+                                                                </userDefinedRuntimeAttribute>
+                                                                <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                                                    <color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                                </userDefinedRuntimeAttribute>
+                                                            </userDefinedRuntimeAttributes>
+                                                        </view>
+                                                    </subviews>
+                                                    <constraints>
+                                                        <constraint firstItem="Et3-gn-ciE" firstAttribute="centerX" secondItem="zWn-KM-9py" secondAttribute="centerX" id="5SW-vB-DAm"/>
+                                                        <constraint firstItem="Et3-gn-ciE" firstAttribute="top" secondItem="Trj-oS-RaI" secondAttribute="bottom" constant="10" id="GcZ-Be-MrS"/>
+                                                        <constraint firstItem="Et3-gn-ciE" firstAttribute="width" secondItem="zWn-KM-9py" secondAttribute="width" id="TAv-Wh-Gec"/>
+                                                        <constraint firstItem="Trj-oS-RaI" firstAttribute="centerX" secondItem="zWn-KM-9py" secondAttribute="centerX" id="clD-T1-Ga1"/>
+                                                        <constraint firstItem="Trj-oS-RaI" firstAttribute="width" secondItem="zWn-KM-9py" secondAttribute="width" id="oQW-7X-eiK"/>
+                                                        <constraint firstItem="Trj-oS-RaI" firstAttribute="top" secondItem="zWn-KM-9py" secondAttribute="top" id="rC2-7C-RUH"/>
+                                                    </constraints>
+                                                </stackView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="zWn-KM-9py" firstAttribute="centerX" secondItem="O30-vI-Tga" secondAttribute="centerX" id="BCL-JB-6el"/>
+                                                <constraint firstItem="zWn-KM-9py" firstAttribute="height" secondItem="O30-vI-Tga" secondAttribute="height" id="ENO-ft-pka"/>
+                                                <constraint firstItem="zWn-KM-9py" firstAttribute="width" secondItem="O30-vI-Tga" secondAttribute="width" id="fQa-AU-a1J"/>
+                                                <constraint firstItem="zWn-KM-9py" firstAttribute="centerY" secondItem="O30-vI-Tga" secondAttribute="centerY" id="tTv-jp-vug"/>
+                                            </constraints>
+                                            <edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
+                                            <userDefinedRuntimeAttributes>
+                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                    <real key="value" value="0.0"/>
+                                                </userDefinedRuntimeAttribute>
+                                                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                                    <real key="value" value="0.0"/>
+                                                </userDefinedRuntimeAttribute>
+                                            </userDefinedRuntimeAttributes>
+                                        </view>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="ANk-4K-DBn" firstAttribute="centerY" secondItem="1tl-Rf-vmM" secondAttribute="centerY" id="32h-Uf-A6O"/>
+                                        <constraint firstItem="O30-vI-Tga" firstAttribute="width" secondItem="1tl-Rf-vmM" secondAttribute="width" constant="-20" id="H6i-C0-iLl"/>
+                                        <constraint firstItem="O30-vI-Tga" firstAttribute="centerY" secondItem="1tl-Rf-vmM" secondAttribute="centerY" id="UM4-RM-fCP"/>
+                                        <constraint firstItem="ANk-4K-DBn" firstAttribute="height" secondItem="1tl-Rf-vmM" secondAttribute="height" constant="-20" id="X9l-D2-wpr"/>
+                                        <constraint firstItem="O30-vI-Tga" firstAttribute="centerX" secondItem="1tl-Rf-vmM" secondAttribute="centerX" id="bcV-jn-OzN"/>
+                                        <constraint firstItem="ANk-4K-DBn" firstAttribute="width" secondItem="1tl-Rf-vmM" secondAttribute="width" constant="-20" id="g3J-QI-uUU"/>
+                                        <constraint firstItem="ANk-4K-DBn" firstAttribute="centerX" secondItem="1tl-Rf-vmM" secondAttribute="centerX" id="hc3-iw-a9J"/>
+                                        <constraint firstItem="O30-vI-Tga" firstAttribute="height" secondItem="1tl-Rf-vmM" secondAttribute="height" constant="-20" id="neE-NI-yZa"/>
+                                    </constraints>
+                                    <edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
+                                </view>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="1tl-Rf-vmM" firstAttribute="centerY" secondItem="onh-i9-8Tz" secondAttribute="centerY" id="Eom-1v-GO4"/>
+                                <constraint firstAttribute="bottom" secondItem="1tl-Rf-vmM" secondAttribute="bottom" id="H5Q-1i-OhR"/>
+                                <constraint firstItem="1tl-Rf-vmM" firstAttribute="width" secondItem="onh-i9-8Tz" secondAttribute="width" id="LTx-LP-2dU"/>
+                                <constraint firstItem="1tl-Rf-vmM" firstAttribute="top" secondItem="onh-i9-8Tz" secondAttribute="top" id="gM1-dS-jWM"/>
+                                <constraint firstItem="1tl-Rf-vmM" firstAttribute="centerX" secondItem="onh-i9-8Tz" secondAttribute="centerX" id="yyZ-Mm-MFj"/>
+                            </constraints>
+                        </stackView>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="onh-i9-8Tz" firstAttribute="top" secondItem="tXE-yu-DoB" secondAttribute="top" id="CrY-e7-Nd6"/>
+                        <constraint firstAttribute="trailing" secondItem="onh-i9-8Tz" secondAttribute="trailing" id="F0Q-kD-nwz"/>
+                        <constraint firstItem="onh-i9-8Tz" firstAttribute="width" secondItem="tXE-yu-DoB" secondAttribute="width" id="VNo-3N-w64"/>
+                        <constraint firstItem="onh-i9-8Tz" firstAttribute="leading" secondItem="tXE-yu-DoB" secondAttribute="leading" id="VXj-xp-cWQ"/>
+                        <constraint firstAttribute="bottom" secondItem="onh-i9-8Tz" secondAttribute="bottom" id="uCE-No-aOq"/>
+                    </constraints>
+                </scrollView>
+            </subviews>
+            <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>
+    <resources>
+        <image name="PhotoPlaceholder" width="170" height="108"/>
+    </resources>
+</document>

+ 89 - 0
app/RowLablancaDay.swift

@@ -0,0 +1,89 @@
+// 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 UIKit
+
+/**
+Extension of UIView to be formatted as sections.
+*/
+@IBDesignable class RowLablancaDay: UIView {
+	
+	// Outlets
+	@IBOutlet weak var container: UIView!
+	@IBOutlet weak var number: UILabel!
+	@IBOutlet weak var month: UILabel!
+	@IBOutlet weak var name: UILabel!
+	@IBOutlet weak var price: UILabel!
+	@IBOutlet weak var separator: UIView!
+	
+	
+	
+	
+	/**
+	Default constructor
+	*/
+	required init?(coder aDecoder: NSCoder) {
+		super.init(coder: aDecoder)
+	}
+	
+	/**
+	Loads the view from the xib with the same name as the class.
+	*/
+	private func loadViewFromNib() {
+		let bundle = Bundle(for: type(of: self))
+		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
+		nib.instantiate(withOwner: self, options: nil).first as! UIView
+		
+		self.frame = self.bounds
+		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		self.translatesAutoresizingMaskIntoConstraints = true
+		
+		container.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		container.translatesAutoresizingMaskIntoConstraints = true
+		
+		container.frame = self.bounds
+		self.addSubview(container)
+		
+	}
+	
+	/**
+	Default constructor.
+	:param: s Custom identifier
+	:param: i Custom identifier
+	*/
+	init(s: String, i: Int) {
+		NSLog(":ROWLABLANCADAY:DEBUG: Init \(s), \(i)")
+		
+		super.init(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
+		loadViewFromNib()
+		self.frame = self.bounds
+		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		self.translatesAutoresizingMaskIntoConstraints = true
+	}
+	
+	/**
+	Default constructor for the interface builder
+	*/
+	override init(frame: CGRect){
+		super.init(frame: frame)
+	}
+	
+}

+ 102 - 0
app/RowLablancaDay.xib

@@ -0,0 +1,102 @@
+<?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">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <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="RowLablancaDay" customModule="app">
+            <connections>
+                <outlet property="container" destination="gfH-i8-jRE" id="wgl-1w-I1S"/>
+                <outlet property="month" destination="5Qr-iE-jB1" id="N9E-Yg-Dx5"/>
+                <outlet property="name" destination="Bq6-IK-wMo" id="f8D-Fk-GR1"/>
+                <outlet property="number" destination="fyr-yz-Mdw" id="tbR-wz-NFB"/>
+                <outlet property="price" destination="EBl-yy-csC" id="iW2-CE-0GB"/>
+                <outlet property="separator" destination="jGw-ai-rD9" id="qZ8-a1-fSi"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="RowLablancaDay" customModule="app">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gfH-i8-jRE" userLabel="Container">
+                    <rect key="frame" x="0.0" y="197.5" width="320" height="85"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="25" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fyr-yz-Mdw" userLabel="Number">
+                            <rect key="frame" x="0.0" y="0.0" width="60" height="50"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="50" id="B8H-ex-mmQ"/>
+                                <constraint firstAttribute="width" constant="60" id="VZe-Ub-0PF"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="30"/>
+                            <nil key="textColor"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Agosto" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Qr-iE-jB1" userLabel="Month">
+                            <rect key="frame" x="0.0" y="50" width="80" height="20.5"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="80" id="RZL-5X-uNW"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+                            <nil key="textColor"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Margo Txiki" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bq6-IK-wMo" userLabel="Name">
+                            <rect key="frame" x="80" y="0.0" width="160" height="60"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="60" id="INd-c0-4oI"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="italicSystem" pointSize="17"/>
+                            <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="60 E" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EBl-yy-csC" userLabel="Price">
+                            <rect key="frame" x="240" y="0.0" width="70" height="85"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="70" id="E4j-HZ-ldc"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="30"/>
+                            <color key="textColor" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jGw-ai-rD9" userLabel="BSeparator">
+                            <rect key="frame" x="16" y="79" width="288" height="1"/>
+                            <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="J4D-Ti-cxq"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    <constraints>
+                        <constraint firstItem="EBl-yy-csC" firstAttribute="height" secondItem="gfH-i8-jRE" secondAttribute="height" id="0Y2-3c-XrT"/>
+                        <constraint firstItem="fyr-yz-Mdw" firstAttribute="leading" secondItem="gfH-i8-jRE" secondAttribute="leading" id="35s-RT-Oj6"/>
+                        <constraint firstItem="Bq6-IK-wMo" firstAttribute="top" secondItem="gfH-i8-jRE" secondAttribute="top" id="8jB-bt-jc1"/>
+                        <constraint firstAttribute="trailing" secondItem="Bq6-IK-wMo" secondAttribute="trailing" constant="80" id="EQ4-Hb-Tak"/>
+                        <constraint firstItem="fyr-yz-Mdw" firstAttribute="top" secondItem="gfH-i8-jRE" secondAttribute="top" id="J4i-zA-a0P"/>
+                        <constraint firstItem="5Qr-iE-jB1" firstAttribute="leading" secondItem="gfH-i8-jRE" secondAttribute="leading" id="NIm-B3-jCe"/>
+                        <constraint firstItem="jGw-ai-rD9" firstAttribute="width" secondItem="gfH-i8-jRE" secondAttribute="width" multiplier="0.9" id="PFQ-Ss-B4n"/>
+                        <constraint firstItem="5Qr-iE-jB1" firstAttribute="top" secondItem="fyr-yz-Mdw" secondAttribute="bottom" id="SK6-qC-aSb"/>
+                        <constraint firstItem="jGw-ai-rD9" firstAttribute="centerX" secondItem="gfH-i8-jRE" secondAttribute="centerX" id="cXu-Ex-OPq"/>
+                        <constraint firstAttribute="bottom" secondItem="EBl-yy-csC" secondAttribute="bottom" id="eKu-rV-ta5"/>
+                        <constraint firstAttribute="bottom" secondItem="jGw-ai-rD9" secondAttribute="bottom" constant="5" id="iXz-7T-gxt"/>
+                        <constraint firstItem="Bq6-IK-wMo" firstAttribute="leading" secondItem="fyr-yz-Mdw" secondAttribute="trailing" constant="20" id="p56-bu-QTp"/>
+                        <constraint firstAttribute="height" constant="85" id="r9E-HA-2EY"/>
+                        <constraint firstAttribute="trailing" secondItem="EBl-yy-csC" secondAttribute="trailing" constant="10" id="r9k-aS-TeZ"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <constraints>
+                <constraint firstItem="gfH-i8-jRE" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="YtF-gj-uYr"/>
+                <constraint firstItem="gfH-i8-jRE" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="mOr-Je-9MW"/>
+                <constraint firstItem="gfH-i8-jRE" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ocq-OY-EmP"/>
+            </constraints>
+        </view>
+    </objects>
+</document>

+ 172 - 2
app/Sync.swift

@@ -81,8 +81,8 @@ class Sync{
 			let dataActivityTag : [String] = self.getTable(data: strData!, table: "activity_tag")
 			let dataActivityItinerary : [String] = self.getTable(data: strData!, table: "activity_itinerary")
 			let dataAlbum : [String] = self.getTable(data: strData!, table: "album")
-			//let dataFestival : [String] = self.getTable(data: strData!, table: "festival")
-			//let dataFestivalDay : [String] = self.getTable(data: strData!, table: "festival_day")
+			let dataFestival : [String] = self.getTable(data: strData!, table: "festival")
+			let dataFestivalDay : [String] = self.getTable(data: strData!, table: "festival_day")
 			//let dataFestivalEvent : [String] = self.getTable(data: strData!, table: "festival_event")
 			//let dataFestivalEventImage : [String] = self.getTable(data: strData!, table: "festival_event_image")
 			//let dataFestivalOffer : [String] = self.getTable(data: strData!, table: "festival_offer")
@@ -116,6 +116,9 @@ class Sync{
 			self.saveTablePhoto(entries: dataPhoto)
 			self.saveTablePhotoAlbum(entries: dataPhotoAlbum)
 			
+			self.saveTableFestival(entries: dataFestival)
+			self.saveTableFestivalDay(entries: dataFestivalDay)
+			
 			self.saveSettings(entries: dataSettings)
 			
 			
@@ -1384,6 +1387,173 @@ class Sync{
 		}
 	}
 	
+	/**
+	Saves the data in the table.
+	:param: entries Array of strings containing the rows of the table, in JSON format.
+	*/
+	func saveTableFestival(entries : [String]){
+		
+		NSLog(":SYNC:LOG: Saving table Festival.")
+		
+		//Set up context
+		let appDelegate = UIApplication.shared.delegate as! AppDelegate
+		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
+		context.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
+		
+		let entity =  NSEntityDescription.entity(forEntityName: "Festival", in: context)
+		
+		var row: NSManagedObject
+		
+		//Delete all previous entries
+		let fetch = NSFetchRequest<NSFetchRequestResult>(entityName: "Festival")
+		let request = NSBatchDeleteRequest(fetchRequest: fetch)
+		do {
+			try context.execute(request)
+		} catch let error as NSError  {
+			NSLog(":SYNC:ERROR: Could not clean up Festival: \(error), \(error.userInfo).")
+		} catch {
+			NSLog(":SYNC:ERROR: Could not clean up Festival entity.")
+		}
+		
+		//Loop new entries
+		for entry in entries{
+			
+			row = NSManagedObject(entity: entity!, insertInto: context)
+			
+			//Get id
+			var str = entry
+			let id: Int = Int(str.subStr(start : str.indexOf(target : "\"id\":")! + 6, end : str.indexOf(target : ",\"")! - 2))!
+			row.setValue(id, forKey: "id")
+			
+			//Get year
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let file: Int = Int(str.subStr(start : str.indexOf(target : "\"year\":")! + 8, end : str.indexOf(target : ",\"")! - 2))!
+			row.setValue(file, forKey: "year")
+			
+			//Get text_es
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let text_es: String = str.subStr(start : str.indexOf(target : "\"text_es\":")! + 11, end : str.indexOf(target : ",\"")! - 2)
+			row.setValue(text_es, forKey: "text_es")
+			
+			//Get text_en
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let text_en: String = str.subStr(start : str.indexOf(target : "\"text_en\":")! + 11, end : str.indexOf(target : ",\"")! - 2)
+			row.setValue(text_en, forKey: "text_en")
+			
+			//Get text_eu
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let text_eu: String = str.subStr(start : str.indexOf(target : "\"text_eu\":")! + 11, end : str.indexOf(target : ",\"")! - 2)
+			row.setValue(text_eu, forKey: "text_eu")
+			
+			//Get summary_es
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let summary_es: String = str.subStr(start : str.indexOf(target : "\"summary_es\":")! + 14, end : str.indexOf(target : ",\"")! - 2)
+			row.setValue(summary_es, forKey: "summary_es")
+			
+			//Get summary_en
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let summary_en: String = str.subStr(start : str.indexOf(target : "\"summary_en\":")! + 14, end : str.indexOf(target : ",\"")! - 2)
+			row.setValue(summary_en, forKey: "summary_en")
+			
+			//Get summary_eu
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let summary_eu: String = str.subStr(start : str.indexOf(target : "\"summary_eu\":")! + 14, end : str.indexOf(target : ",\"")! - 2)
+			row.setValue(summary_eu, forKey: "summary_eu")
+			
+			//Get img
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let img: String = str.subStr(start : str.indexOf(target : "\"img\":")! + 7, end : str.length - 2)
+			row.setValue(img, forKey: "img")
+			
+			//Save CoreData
+			do {
+				try context.save()
+			} catch let error as NSError  {
+				NSLog(":SYNC:ERROR: Could not store Festival entry \(error.userInfo).")
+			} catch {
+				NSLog(":SYNC:ERROR: Could not store Festival entry.")
+			}
+		}
+	}
+	
+	/**
+	Saves the data in the table.
+	:param: entries Array of strings containing the rows of the table, in JSON format.
+	*/
+	func saveTableFestivalDay(entries : [String]){
+		
+		NSLog(":SYNC:LOG: Saving table FestivalDay.")
+		
+		let dateFormatter = DateFormatter()
+		dateFormatter.timeZone = TimeZone.ReferenceType.local
+		
+		//Set up context
+		let appDelegate = UIApplication.shared.delegate as! AppDelegate
+		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
+		context.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
+		
+		let entity =  NSEntityDescription.entity(forEntityName: "Festival_day", in: context)
+		
+		var row: NSManagedObject
+		
+		//Delete all previous entries
+		let fetch = NSFetchRequest<NSFetchRequestResult>(entityName: "Festival_day")
+		let request = NSBatchDeleteRequest(fetchRequest: fetch)
+		do {
+			try context.execute(request)
+		} catch let error as NSError  {
+			NSLog(":SYNC:ERROR: Could not clean up Festival: \(error), \(error.userInfo).")
+		} catch {
+			NSLog(":SYNC:ERROR: Could not clean up Festival entity.")
+		}
+		
+		//Loop new entries
+		for entry in entries{
+			
+			row = NSManagedObject(entity: entity!, insertInto: context)
+			
+			//Get id
+			var str = entry
+			let id: Int = Int(str.subStr(start : str.indexOf(target : "\"id\":")! + 6, end : str.indexOf(target : ",\"")! - 2))!
+			row.setValue(id, forKey: "id")
+			
+			//Get date
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			dateFormatter.dateFormat = "yyyy-MM-dd"
+			let date = dateFormatter.date(from: str.subStr(start : str.indexOf(target : "\"date\":")! + 8, end : str.indexOf(target : ",\"")! - 2))!
+			row.setValue(date, forKey: "date")
+			
+			//Get name_es
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let name_es: String = str.subStr(start : str.indexOf(target : "\"name_es\":")! + 11, end : str.indexOf(target : ",\"")! - 2)
+			row.setValue(name_es, forKey: "name_es")
+			
+			//Get name_en
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let name_en: String = str.subStr(start : str.indexOf(target : "\"name_en\":")! + 11, end : str.indexOf(target : ",\"")! - 2)
+			row.setValue(name_en, forKey: "name_en")
+			
+			//Get name_eu
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let name_eu: String = str.subStr(start : str.indexOf(target : "\"name_eu\":")! + 11, end : str.indexOf(target : ",\"")! - 2)
+			row.setValue(name_eu, forKey: "name_eu")
+			
+			//Get price
+			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
+			let price: Int = Int(str.subStr(start : str.indexOf(target : "\"price\":")! + 9, end : str.length - 2))!
+			row.setValue(price, forKey: "price")
+			
+			//Save CoreData
+			do {
+				try context.save()
+			} catch let error as NSError  {
+				NSLog(":SYNC:ERROR: Could not store Festival_day entry \(error.userInfo).")
+			} catch {
+				NSLog(":SYNC:ERROR: Could not store Festival_day entry.")
+			}
+		}
+	}
+	
 	/**
 	Saves the received settings.
 	:param: entries Array of strings containing the rows of the table, in JSON format.

+ 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!
 	

+ 2 - 2
app/app.xcdatamodeld/app.xcdatamodel/contents

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16B2657" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
     <entity name="Activity" representedClassName=".Activity" syncable="YES" codeGenerationType="class">
         <attribute name="after_en" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="after_es" optional="YES" attributeType="String" syncable="YES"/>
@@ -81,7 +81,7 @@
         <attribute name="name_en" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="name_es" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="name_eu" optional="YES" attributeType="String" syncable="YES"/>
-        <attribute name="price" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="price" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
     </entity>
     <entity name="Festival_event" representedClassName=".Festival_event" syncable="YES" codeGenerationType="class">
         <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>