Эх сурвалжийг харах

Merge branch 'BaseProject' into Sync

Iñigo Valentin 9 жил өмнө
parent
commit
d41859d769

+ 8 - 8
README.es-ES.md

@@ -11,17 +11,16 @@ Una aplicacion para iOS para miembros de [Gasteizko Margolariak](https://margola
 
 
 Hay funciones diseñadas especificamente para las Fiestas de La Blanca, y solo estarán disponibles en esas fechas.
 Hay funciones diseñadas especificamente para las Fiestas de La Blanca, y solo estarán disponibles en esas fechas.
 
 
-* [NO IMPLEMENTADO] Consulta en tu teléfono el Programa de Fiestas, encuentra actos alrededor tuyo ydescubre como llegar hasta ellos.
+* Consulta en tu teléfono el Programa de Fiestas, encuentra actos alrededor tuyo ydescubre como llegar hasta ellos.
 * Consulta el Programa de Fiestas de Gasteizko Margolariak, detallado y con la ubicación de cada actividad...
 * Consulta el Programa de Fiestas de Gasteizko Margolariak, detallado y con la ubicación de cada actividad...
 * ... pero, como no somos famosos por nuestra puntualidad, comprueba nuestra ubicación en tiempo real.
 * ... pero, como no somos famosos por nuestra puntualidad, comprueba nuestra ubicación en tiempo real.
-* [NO IMPLEMENTADO] Descubre eventos a tu alrededor.
 
 
 
 
 ### Durante el resto del año ###
 ### Durante el resto del año ###
 
 
-* [PARCIALMENTE IMPLEMENTADO] Mantente informado de las actividades que organizamos durante el resto del año.
-* [PARCIALMENTE IMPLEMENTADO] Recibe las ultimas noticias sobre la Cuadrilla en nuestro Blog
-* [PARCIALMENTE IMPLEMENTADO] Galería de fotos de todas nuestras actividades.
+* Mantente informado de las actividades que organizamos durante el resto del año.
+* Recibe las ultimas noticias sobre la Cuadrilla en nuestro Blog
+* Galería de fotos de todas nuestras actividades.
 
 
 
 
 ### Compatibilidad ###
 ### Compatibilidad ###
@@ -31,9 +30,9 @@ iOS 9.1 o superior.
 
 
 ### Idiomas ###
 ### Idiomas ###
 
 
-* [IMPLEMENTADO] Castellano
-* [NO IMPLEMENTADO] Inglés
-* [NO IMPLEMENTADO] Euskera 
+* Castellano
+* [PARCIALMENTE] Inglés
+* [PARCIALMENTE] Euskera 
 
 
 
 
 ### Otros dispositivos ###
 ### Otros dispositivos ###
@@ -41,3 +40,4 @@ iOS 9.1 o superior.
 * ¿Android? [Lo tenemos!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakApp) 
 * ¿Android? [Lo tenemos!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakApp) 
 * ¿Prefieres el sitio web? [No problem!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakWeb)
 * ¿Prefieres el sitio web? [No problem!](https://github.com/GasteizkoMargolariak/GasteizkoMargolariakWeb)
 
 
+

+ 7 - 8
README.es-EU.md

@@ -11,17 +11,16 @@ Una aplicacion para iOS para miembros de [Gasteizko Margolariak](https://margola
 
 
 Hay funciones diseñadas especificamente para las Fiestas de La Blanca, y solo estarán disponibles en esas fechas.
 Hay funciones diseñadas especificamente para las Fiestas de La Blanca, y solo estarán disponibles en esas fechas.
 
 
-* [NO IMPLEMENTADO] Consulta en tu teléfono el Programa de Fiestas, encuentra actos alrededor tuyo ydescubre como llegar hasta ellos.
+* Consulta en tu teléfono el Programa de Fiestas, encuentra actos alrededor tuyo ydescubre como llegar hasta ellos.
 * Consulta el Programa de Fiestas de Gasteizko Margolariak, detallado y con la ubicación de cada actividad...
 * Consulta el Programa de Fiestas de Gasteizko Margolariak, detallado y con la ubicación de cada actividad...
 * ... pero, como no somos famosos por nuestra puntualidad, comprueba nuestra ubicación en tiempo real.
 * ... pero, como no somos famosos por nuestra puntualidad, comprueba nuestra ubicación en tiempo real.
-* Descubre eventos a tu alrededor.
 
 
 
 
 ### Durante el resto del año ###
 ### Durante el resto del año ###
 
 
-* [PARCIALMENTE IMPLEMENTADO] Mantente informado de las actividades que organizamos durante el resto del año.
-* [PARCIALMENTE IMPLEMENTADO] Recibe las ultimas noticias sobre la Cuadrilla en nuestro Blog
-* [PARCIALMENTE IMPLEMENTADO] Galería de fotos de todas nuestras actividades.
+* Mantente informado de las actividades que organizamos durante el resto del año.
+* Recibe las ultimas noticias sobre la Cuadrilla en nuestro Blog
+* Galería de fotos de todas nuestras actividades.
 
 
 
 
 ### Compatibilidad ###
 ### Compatibilidad ###
@@ -31,9 +30,9 @@ iOS 9.1 o superior.
 
 
 ### Idiomas ###
 ### Idiomas ###
 
 
-* [IMPLEMENTADO] Castellano
-* [NO IMPLEMENTADO] Inglés
-* [NO IMPLEMENTADO] Euskera 
+* Castellano
+* [PARCIALMENTE] Inglés
+* [PARCIALMENTE] Euskera 
 
 
 
 
 ### Otros dispositivos ###
 ### Otros dispositivos ###

+ 7 - 8
README.md

@@ -11,17 +11,16 @@ An iOS app intended for members of [Gasteizko Margolariak](https://margolariak.c
 
 
 This features will be only available during the city festivals.
 This features will be only available during the city festivals.
 
 
-* [TODO] Check out the festival schedule, discover events all around the city, and get their location.
+* Check out the festival schedule, discover events all around the city, and get their location.
 * Check out the schedule for the members of Gasteizko Margolariak, indicating the location of every event and activity...
 * Check out the schedule for the members of Gasteizko Margolariak, indicating the location of every event and activity...
 * ... but, since we are not known for our puntuality, check out the location of Gasteizko Margolariak in real time.
 * ... but, since we are not known for our puntuality, check out the location of Gasteizko Margolariak in real time.
-* [TODO] Approximate distance to important event around the city.
 
 
 
 
 ### Features for the rest of the year ###
 ### Features for the rest of the year ###
 
 
-* [PARTIALLY IMPLEMENTED] Check out and be notified of all activities organized by Gasteizko Margolariak.
-* [MOSTLY IMPLEMENTED] Stay updated witho our blog.
-* [MOSTLY IMPLEMENTED] Check out our photo gallery.
+* Check out and be notified of all activities organized by Gasteizko Margolariak.
+* Stay updated witho our blog.
+* Check out our photo gallery.
 
 
 
 
 ### Compatibility ###
 ### Compatibility ###
@@ -31,9 +30,9 @@ iOS 9.1 or higher.
 
 
 ### Languages ###
 ### Languages ###
 
 
-* [AVAILABLE] Spanish
-* [TODO] English
-* [TODO] Basque
+* Spanish
+* [PARTIALLY] English
+* [PARTIALLY] Basque
 
 
 
 
 ### On other devices ###
 ### On other devices ###

+ 12 - 0
app.xcodeproj/project.pbxproj

@@ -69,6 +69,9 @@
 		93BAD2F81E586741009DF853 /* RowHomeSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BAD2F71E586741009DF853 /* RowHomeSocial.swift */; };
 		93BAD2F81E586741009DF853 /* RowHomeSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BAD2F71E586741009DF853 /* RowHomeSocial.swift */; };
 		93BEB6D21E7E878300C68DE5 /* PostViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BEB6D11E7E878300C68DE5 /* PostViewController.swift */; };
 		93BEB6D21E7E878300C68DE5 /* PostViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BEB6D11E7E878300C68DE5 /* PostViewController.swift */; };
 		93D8B0941EF1A64C008BD946 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D8B0931EF1A64C008BD946 /* Notifications.swift */; };
 		93D8B0941EF1A64C008BD946 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D8B0931EF1A64C008BD946 /* Notifications.swift */; };
+		93D8B0961EF1B98E008BD946 /* FutureActivityViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D8B0951EF1B98E008BD946 /* FutureActivityViewController.swift */; };
+		93D8B0981EF1B99A008BD946 /* RowItinerary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D8B0971EF1B99A008BD946 /* RowItinerary.swift */; };
+		93D8B09A1EF1BA03008BD946 /* RowItinerary.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93D8B0991EF1BA03008BD946 /* RowItinerary.xib */; };
 		93D9EA601DE271E700089002 /* Section.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93D9EA5F1DE271E700089002 /* Section.xib */; };
 		93D9EA601DE271E700089002 /* Section.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93D9EA5F1DE271E700089002 /* Section.xib */; };
 		93D9EA641DE273FD00089002 /* Section.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA631DE273FD00089002 /* Section.swift */; };
 		93D9EA641DE273FD00089002 /* Section.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA631DE273FD00089002 /* Section.swift */; };
 		93D9EA681DE342AC00089002 /* UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA671DE342AC00089002 /* UIView.swift */; };
 		93D9EA681DE342AC00089002 /* UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA671DE342AC00089002 /* UIView.swift */; };
@@ -157,6 +160,9 @@
 		93BAD2F71E586741009DF853 /* RowHomeSocial.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowHomeSocial.swift; sourceTree = "<group>"; };
 		93BAD2F71E586741009DF853 /* RowHomeSocial.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowHomeSocial.swift; sourceTree = "<group>"; };
 		93BEB6D11E7E878300C68DE5 /* PostViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostViewController.swift; sourceTree = "<group>"; };
 		93BEB6D11E7E878300C68DE5 /* PostViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostViewController.swift; sourceTree = "<group>"; };
 		93D8B0931EF1A64C008BD946 /* Notifications.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Notifications.swift; sourceTree = "<group>"; };
 		93D8B0931EF1A64C008BD946 /* Notifications.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Notifications.swift; sourceTree = "<group>"; };
+		93D8B0951EF1B98E008BD946 /* FutureActivityViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FutureActivityViewController.swift; sourceTree = "<group>"; };
+		93D8B0971EF1B99A008BD946 /* RowItinerary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowItinerary.swift; sourceTree = "<group>"; };
+		93D8B0991EF1BA03008BD946 /* RowItinerary.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowItinerary.xib; sourceTree = "<group>"; };
 		93D9EA5F1DE271E700089002 /* Section.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = Section.xib; path = ../Section.xib; sourceTree = "<group>"; };
 		93D9EA5F1DE271E700089002 /* Section.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = Section.xib; path = ../Section.xib; sourceTree = "<group>"; };
 		93D9EA631DE273FD00089002 /* Section.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Section.swift; sourceTree = "<group>"; };
 		93D9EA631DE273FD00089002 /* Section.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Section.swift; sourceTree = "<group>"; };
 		93D9EA671DE342AC00089002 /* UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIView.swift; sourceTree = "<group>"; };
 		93D9EA671DE342AC00089002 /* UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIView.swift; sourceTree = "<group>"; };
@@ -292,6 +298,9 @@
 				93B9113E1ED7582B0061BA71 /* LocationView.swift */,
 				93B9113E1ED7582B0061BA71 /* LocationView.swift */,
 				93B9115E1ED765510061BA71 /* app-Bridging-Header.h */,
 				93B9115E1ED765510061BA71 /* app-Bridging-Header.h */,
 				93EE9ECA1EE9B87100288F6E /* PastActivityViewController.swift */,
 				93EE9ECA1EE9B87100288F6E /* PastActivityViewController.swift */,
+				93D8B0971EF1B99A008BD946 /* RowItinerary.swift */,
+				93D8B0991EF1BA03008BD946 /* RowItinerary.xib */,
+				93D8B0951EF1B98E008BD946 /* FutureActivityViewController.swift */,
 				93E5058E1EEB0DCC00560B4A /* PhotoViewController.swift */,
 				93E5058E1EEB0DCC00560B4A /* PhotoViewController.swift */,
 			);
 			);
 			path = app;
 			path = app;
@@ -390,6 +399,7 @@
 			files = (
 			files = (
 				93E0C5E21EB7E7F000905811 /* ActivitiesView.xib in Resources */,
 				93E0C5E21EB7E7F000905811 /* ActivitiesView.xib in Resources */,
 				931AA5AE1E218D0E003A2290 /* Entry.xib in Resources */,
 				931AA5AE1E218D0E003A2290 /* Entry.xib in Resources */,
+				93D8B09A1EF1BA03008BD946 /* RowItinerary.xib in Resources */,
 				93E0C5E81EBDF0E700905811 /* RowFutureActivity.xib in Resources */,
 				93E0C5E81EBDF0E700905811 /* RowFutureActivity.xib in Resources */,
 				938D211D1EA2275300C47EC3 /* LablancaView.xib in Resources */,
 				938D211D1EA2275300C47EC3 /* LablancaView.xib in Resources */,
 				93075C721E59D06900396389 /* RowBlog.xib in Resources */,
 				93075C721E59D06900396389 /* RowBlog.xib in Resources */,
@@ -438,6 +448,7 @@
 				93294FFA1E337D0D00FDAF50 /* RowHomePastActivities.swift in Sources */,
 				93294FFA1E337D0D00FDAF50 /* RowHomePastActivities.swift in Sources */,
 				93B5C01A1E872B4B0069BFF8 /* RowHomeGallery.swift in Sources */,
 				93B5C01A1E872B4B0069BFF8 /* RowHomeGallery.swift in Sources */,
 				935892D01E493C2300E1CD5F /* UIImageView.swift in Sources */,
 				935892D01E493C2300E1CD5F /* UIImageView.swift in Sources */,
+				93D8B0981EF1B99A008BD946 /* RowItinerary.swift in Sources */,
 				93D9EA761DE3ACBB00089002 /* Sync.swift in Sources */,
 				93D9EA761DE3ACBB00089002 /* Sync.swift in Sources */,
 				93E0C5EA1EBDFFB400905811 /* RowPastActivity.swift in Sources */,
 				93E0C5EA1EBDFFB400905811 /* RowPastActivity.swift in Sources */,
 				93BAD2F41E585EE6009DF853 /* RowHomeFutureActivities.swift in Sources */,
 				93BAD2F41E585EE6009DF853 /* RowHomeFutureActivities.swift in Sources */,
@@ -448,6 +459,7 @@
 				93B84B9C1D9C31AB006C0F67 /* ViewController.swift in Sources */,
 				93B84B9C1D9C31AB006C0F67 /* ViewController.swift in Sources */,
 				93075C6C1E59CB6B00396389 /* BlogView.swift in Sources */,
 				93075C6C1E59CB6B00396389 /* BlogView.swift in Sources */,
 				93B84B9A1D9C31AB006C0F67 /* AppDelegate.swift in Sources */,
 				93B84B9A1D9C31AB006C0F67 /* AppDelegate.swift in Sources */,
+				93D8B0961EF1B98E008BD946 /* FutureActivityViewController.swift in Sources */,
 				93B84BA21D9C31AB006C0F67 /* app.xcdatamodeld in Sources */,
 				93B84BA21D9C31AB006C0F67 /* app.xcdatamodeld in Sources */,
 				935D6E331E867C7E00CED3A1 /* RowGallery.swift in Sources */,
 				935D6E331E867C7E00CED3A1 /* RowGallery.swift in Sources */,
 				93EB2F0C1EBF5AEB00F64186 /* RowSchedule.swift in Sources */,
 				93EB2F0C1EBF5AEB00F64186 /* RowSchedule.swift in Sources */,

+ 16 - 22
app/AlbumViewController.swift

@@ -146,7 +146,6 @@ class AlbumViewController: UIViewController, UIGestureRecognizerDelegate {
 					var imgR = imgSearchResults[0]
 					var imgR = imgSearchResults[0]
 					image = imgR.value(forKey: "file")! as! String
 					image = imgR.value(forKey: "file")! as! String
 					leftId = imgR.value(forKey: "id")! as! Int
 					leftId = imgR.value(forKey: "id")! as! Int
-					NSLog(":GALLERYCONTROLLER:LOG: Image Row \(i) left: \(image)")
 					row.setImage(idx: 0, filename: image)
 					row.setImage(idx: 0, filename: image)
 					if i + 1 < searchResults.count {
 					if i + 1 < searchResults.count {
 						r = searchResults[i + 1]
 						r = searchResults[i + 1]
@@ -159,15 +158,10 @@ class AlbumViewController: UIViewController, UIGestureRecognizerDelegate {
 						imgR = imgSearchResults[0]
 						imgR = imgSearchResults[0]
 						image = imgR.value(forKey: "file")! as! String
 						image = imgR.value(forKey: "file")! as! String
 						rightId = imgR.value(forKey: "id")! as! Int
 						rightId = imgR.value(forKey: "id")! as! Int
-						NSLog(":GALLERYCONTROLLER:LOG: Image Row \(i) right: \(image)")
 						row.setImage(idx: 1, filename: image)
 						row.setImage(idx: 1, filename: image)
 					}
 					}
-					else{
-						NSLog(":GALLERYCONTROLLER:LOG: Image Row \(i) right: none")
-					}
-					//TODO create row, add images (L+R), add row to container.
-					//row.setImage(filename: image)
-				} catch {
+				}
+				catch {
 					NSLog(":GALLERYCONTROLLER:ERROR: Error getting image for post \(id): \(error)")
 					NSLog(":GALLERYCONTROLLER:ERROR: Error getting image for post \(id): \(error)")
 				}
 				}
 				
 				
@@ -183,6 +177,20 @@ class AlbumViewController: UIViewController, UIGestureRecognizerDelegate {
 	}
 	}
 	
 	
 	
 	
+	/**
+	Run before performing a segue.
+	Assigns id if neccessary.
+	:param: segue The segue to perform.
+	:sender: The calling view.
+	*/
+	override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+		if segue.identifier == "SeguePhotoAlbum"{
+			(segue.destination as! PhotoViewController).albumId = passAlbum
+			(segue.destination as! PhotoViewController).photoId = passId
+		}
+	}
+	
+	
 	/**
 	/**
 	Gets the device language. The only recognized languages are Spanish, English and Basque.
 	Gets the device language. The only recognized languages are Spanish, English and Basque.
 	If the device has another language, Spanish will be selected by default.
 	If the device has another language, Spanish will be selected by default.
@@ -199,20 +207,6 @@ class AlbumViewController: UIViewController, UIGestureRecognizerDelegate {
 	}
 	}
 	
 	
 	
 	
-	/**
-	Run before performing a segue.
-	Assigns id if neccessary.
-	:param: segue The segue to perform.
-	:sender: The calling view.
-	*/
-	override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
-		if segue.identifier == "SeguePhotoAlbum"{
-			(segue.destination as! PhotoViewController).albumId = passAlbum
-			(segue.destination as! PhotoViewController).photoId = passId
-		}
-	}
-	
-	
 	/**
 	/**
 	Shows a photo.
 	Shows a photo.
 	:param: id The album id.
 	:param: id The album id.

+ 183 - 164
app/Base.lproj/Main.storyboard

@@ -16,7 +16,7 @@
         <scene sceneID="e3W-6Z-Jyk">
         <scene sceneID="e3W-6Z-Jyk">
             <objects>
             <objects>
                 <navigationController title="Gasteizko Margolariak" id="cgF-cq-ysf" sceneMemberID="viewController">
                 <navigationController title="Gasteizko Margolariak" id="cgF-cq-ysf" sceneMemberID="viewController">
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="lgI-h9-O0s">
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="lgI-h9-O0s">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
                         <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <color key="backgroundColor" red="0.4079896717" green="1" blue="0.34807942549999998" alpha="1" colorSpace="calibratedRGB"/>
                         <color key="backgroundColor" red="0.4079896717" green="1" blue="0.34807942549999998" alpha="1" colorSpace="calibratedRGB"/>
@@ -85,12 +85,12 @@
                                                         <constraint firstAttribute="width" constant="100" id="eKL-ga-53F"/>
                                                         <constraint firstAttribute="width" constant="100" id="eKL-ga-53F"/>
                                                     </constraints>
                                                     </constraints>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                                    <color key="textColor" red="0.78431372549019607" green="0.78431372549019607" blue="0.78431372549019607" alpha="1" colorSpace="calibratedRGB"/>
+                                                    <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                                     <nil key="highlightedColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 </label>
                                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZNu-9N-o6K">
                                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZNu-9N-o6K">
                                                     <rect key="frame" x="4" y="38" width="92" height="4"/>
                                                     <rect key="frame" x="4" y="38" width="92" height="4"/>
-                                                    <color key="backgroundColor" red="0.3529411764705882" green="0.70588235294117641" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                                    <color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                                     <constraints>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="4" id="Si5-HX-bjR"/>
                                                         <constraint firstAttribute="height" constant="4" id="Si5-HX-bjR"/>
                                                     </constraints>
                                                     </constraints>
@@ -200,7 +200,7 @@
                         <segue destination="zJF-Mh-CNb" kind="show" identifier="SegueSchedule" id="A70-jo-yAP"/>
                         <segue destination="zJF-Mh-CNb" kind="show" identifier="SegueSchedule" id="A70-jo-yAP"/>
                         <segue destination="3o1-ab-AT4" kind="show" identifier="SegueSync" id="E96-mK-gE9"/>
                         <segue destination="3o1-ab-AT4" kind="show" identifier="SegueSync" id="E96-mK-gE9"/>
                         <segue destination="jfx-Q2-RtY" kind="show" identifier="SeguePastActivity" id="MmG-k2-wHn"/>
                         <segue destination="jfx-Q2-RtY" kind="show" identifier="SeguePastActivity" id="MmG-k2-wHn"/>
-                        <segue destination="hRA-2q-Tv9" kind="show" identifier="SeguePhoto" id="XIb-zK-EYd"/>
+                        <segue destination="DDO-dI-c0J" kind="show" identifier="SegueFutureActivity" id="ec7-aO-4Ac"/>
                     </connections>
                     </connections>
                 </viewController>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
@@ -382,13 +382,13 @@
                                                                 <rect key="frame" x="8" y="8" width="339" height="949"/>
                                                                 <rect key="frame" x="8" y="8" width="339" height="949"/>
                                                                 <subviews>
                                                                 <subviews>
                                                                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="u3M-mi-Tyn" userLabel="Image">
                                                                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="u3M-mi-Tyn" userLabel="Image">
-                                                                        <rect key="frame" x="10" y="10" width="319" height="180"/>
+                                                                        <rect key="frame" x="0.0" y="10" width="339" height="71"/>
                                                                         <constraints>
                                                                         <constraints>
-                                                                            <constraint firstAttribute="height" constant="180" id="fQp-wR-eLU"/>
+                                                                            <constraint firstAttribute="height" constant="71" id="fQp-wR-eLU"/>
                                                                         </constraints>
                                                                         </constraints>
                                                                     </imageView>
                                                                     </imageView>
                                                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Text" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2i2-HF-HyI" userLabel="Text">
                                                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Text" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2i2-HF-HyI" userLabel="Text">
-                                                                        <rect key="frame" x="17" y="200" width="305.5" height="717"/>
+                                                                        <rect key="frame" x="17" y="91" width="305.5" height="826"/>
                                                                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                                         <nil key="textColor"/>
                                                                         <nil key="textColor"/>
                                                                         <nil key="highlightedColor"/>
                                                                         <nil key="highlightedColor"/>
@@ -412,7 +412,7 @@
                                                                 </subviews>
                                                                 </subviews>
                                                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                                                 <constraints>
                                                                 <constraints>
-                                                                    <constraint firstItem="u3M-mi-Tyn" firstAttribute="width" secondItem="7t9-eQ-KC7" secondAttribute="width" constant="-20" id="4ZF-fF-btB"/>
+                                                                    <constraint firstItem="u3M-mi-Tyn" firstAttribute="width" secondItem="7t9-eQ-KC7" secondAttribute="width" id="4ZF-fF-btB"/>
                                                                     <constraint firstItem="tAc-xa-mg2" firstAttribute="centerX" secondItem="7t9-eQ-KC7" secondAttribute="centerX" id="Bf4-vV-UnB"/>
                                                                     <constraint firstItem="tAc-xa-mg2" firstAttribute="centerX" secondItem="7t9-eQ-KC7" secondAttribute="centerX" id="Bf4-vV-UnB"/>
                                                                     <constraint firstItem="pX4-mq-dj0" firstAttribute="width" secondItem="7t9-eQ-KC7" secondAttribute="width" multiplier="0.9" id="Dqr-hS-PV9"/>
                                                                     <constraint firstItem="pX4-mq-dj0" firstAttribute="width" secondItem="7t9-eQ-KC7" secondAttribute="width" multiplier="0.9" id="Dqr-hS-PV9"/>
                                                                     <constraint firstItem="2i2-HF-HyI" firstAttribute="centerX" secondItem="7t9-eQ-KC7" secondAttribute="centerX" id="Hoe-4Q-YTi"/>
                                                                     <constraint firstItem="2i2-HF-HyI" firstAttribute="centerX" secondItem="7t9-eQ-KC7" secondAttribute="centerX" id="Hoe-4Q-YTi"/>
@@ -697,7 +697,6 @@
                         <outlet property="albumView" destination="YEF-04-q7Y" id="7tR-Lr-9nh"/>
                         <outlet property="albumView" destination="YEF-04-q7Y" id="7tR-Lr-9nh"/>
                         <outlet property="barButton" destination="Thj-0t-rxK" id="6bX-xo-abt"/>
                         <outlet property="barButton" destination="Thj-0t-rxK" id="6bX-xo-abt"/>
                         <outlet property="barTitle" destination="LLe-aQ-Sbj" id="bFR-jT-Xmq"/>
                         <outlet property="barTitle" destination="LLe-aQ-Sbj" id="bFR-jT-Xmq"/>
-                        <segue destination="hRA-2q-Tv9" kind="show" identifier="SeguePhotoAlbum" id="ftR-BO-YPe"/>
                     </connections>
                     </connections>
                 </viewController>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="GLj-OZ-Cqc" userLabel="First Responder" sceneMemberID="firstResponder"/>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="GLj-OZ-Cqc" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -1102,13 +1101,13 @@
                                                                 <rect key="frame" x="8" y="8" width="339" height="949"/>
                                                                 <rect key="frame" x="8" y="8" width="339" height="949"/>
                                                                 <subviews>
                                                                 <subviews>
                                                                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="8Jn-h7-TSJ" userLabel="Image">
                                                                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="8Jn-h7-TSJ" userLabel="Image">
-                                                                        <rect key="frame" x="10" y="10" width="319" height="180"/>
+                                                                        <rect key="frame" x="0.0" y="10" width="339" height="71"/>
                                                                         <constraints>
                                                                         <constraints>
-                                                                            <constraint firstAttribute="height" constant="180" id="lZg-2O-4LP"/>
+                                                                            <constraint firstAttribute="height" constant="71" id="lZg-2O-4LP"/>
                                                                         </constraints>
                                                                         </constraints>
                                                                     </imageView>
                                                                     </imageView>
                                                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Text" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Usd-Rm-Tq2" userLabel="Text">
                                                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Text" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Usd-Rm-Tq2" userLabel="Text">
-                                                                        <rect key="frame" x="17" y="200" width="305.5" height="717"/>
+                                                                        <rect key="frame" x="17" y="91" width="305.5" height="826"/>
                                                                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                                         <nil key="textColor"/>
                                                                         <nil key="textColor"/>
                                                                         <nil key="highlightedColor"/>
                                                                         <nil key="highlightedColor"/>
@@ -1141,7 +1140,7 @@
                                                                     <constraint firstItem="Usd-Rm-Tq2" firstAttribute="centerX" secondItem="Omg-cP-uvF" secondAttribute="centerX" id="SHM-nk-s9u"/>
                                                                     <constraint firstItem="Usd-Rm-Tq2" firstAttribute="centerX" secondItem="Omg-cP-uvF" secondAttribute="centerX" id="SHM-nk-s9u"/>
                                                                     <constraint firstItem="dvg-B2-xmI" firstAttribute="centerX" secondItem="Omg-cP-uvF" secondAttribute="centerX" id="XBR-sR-Yqg"/>
                                                                     <constraint firstItem="dvg-B2-xmI" firstAttribute="centerX" secondItem="Omg-cP-uvF" secondAttribute="centerX" id="XBR-sR-Yqg"/>
                                                                     <constraint firstItem="LmH-0o-Hku" firstAttribute="centerX" secondItem="Omg-cP-uvF" secondAttribute="centerX" id="a8v-br-EaA"/>
                                                                     <constraint firstItem="LmH-0o-Hku" firstAttribute="centerX" secondItem="Omg-cP-uvF" secondAttribute="centerX" id="a8v-br-EaA"/>
-                                                                    <constraint firstItem="8Jn-h7-TSJ" firstAttribute="width" secondItem="Omg-cP-uvF" secondAttribute="width" constant="-20" id="gm5-CU-FKw"/>
+                                                                    <constraint firstItem="8Jn-h7-TSJ" firstAttribute="width" secondItem="Omg-cP-uvF" secondAttribute="width" id="gm5-CU-FKw"/>
                                                                     <constraint firstItem="8Jn-h7-TSJ" firstAttribute="top" secondItem="Omg-cP-uvF" secondAttribute="top" constant="10" id="js6-Fg-pg1"/>
                                                                     <constraint firstItem="8Jn-h7-TSJ" firstAttribute="top" secondItem="Omg-cP-uvF" secondAttribute="top" constant="10" id="js6-Fg-pg1"/>
                                                                     <constraint firstAttribute="bottom" secondItem="dvg-B2-xmI" secondAttribute="bottom" id="lta-H9-CYI"/>
                                                                     <constraint firstAttribute="bottom" secondItem="dvg-B2-xmI" secondAttribute="bottom" id="lta-H9-CYI"/>
                                                                     <constraint firstItem="LmH-0o-Hku" firstAttribute="width" secondItem="Omg-cP-uvF" secondAttribute="width" multiplier="0.9" id="xmH-tU-ZFp"/>
                                                                     <constraint firstItem="LmH-0o-Hku" firstAttribute="width" secondItem="Omg-cP-uvF" secondAttribute="width" multiplier="0.9" id="xmH-tU-ZFp"/>
@@ -1241,29 +1240,29 @@
                 <placeholder placeholderIdentifier="IBFirstResponder" id="YKC-ZH-aSz" userLabel="First Responder" sceneMemberID="firstResponder"/>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="YKC-ZH-aSz" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
             </objects>
         </scene>
         </scene>
-        <!--Photo-->
-        <scene sceneID="Qxt-8f-I5l">
+        <!--Future Activity View Controller-->
+        <scene sceneID="thm-MM-5qk">
             <objects>
             <objects>
-                <viewController title="Photo" id="hRA-2q-Tv9" customClass="PhotoViewController" customModule="app" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController id="DDO-dI-c0J" customClass="FutureActivityViewController" customModule="app" customModuleProvider="target" sceneMemberID="viewController">
                     <layoutGuides>
                     <layoutGuides>
-                        <viewControllerLayoutGuide type="top" id="iD5-7d-BcL"/>
-                        <viewControllerLayoutGuide type="bottom" id="UVa-jE-Gqw"/>
+                        <viewControllerLayoutGuide type="top" id="yac-Xq-lM3"/>
+                        <viewControllerLayoutGuide type="bottom" id="94e-TO-KhL"/>
                     </layoutGuides>
                     </layoutGuides>
-                    <view key="view" contentMode="scaleToFill" id="zXb-Ja-8dX" userLabel="Container">
+                    <view key="view" contentMode="scaleToFill" id="Tll-v9-w0T">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                         <subviews>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XUY-te-9PN" userLabel="Toolbar">
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wso-as-8H4" userLabel="Toolbar">
                                 <rect key="frame" x="0.0" y="20" width="375" height="30"/>
                                 <rect key="frame" x="0.0" y="20" width="375" height="30"/>
                                 <subviews>
                                 <subviews>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4tx-eL-rur">
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FiC-sd-IGL">
                                         <rect key="frame" x="0.0" y="0.0" width="56.5" height="30"/>
                                         <rect key="frame" x="0.0" y="0.0" width="56.5" height="30"/>
                                         <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
                                         <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
                                         <state key="normal" title="&lt;">
                                         <state key="normal" title="&lt;">
                                             <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                             <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                         </state>
                                         </state>
                                     </button>
                                     </button>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Gasteizko Margolariak" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ifO-mU-TPV">
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Gasteizko Margolariak" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v7W-BZ-qle">
                                         <rect key="frame" x="56.5" y="0.0" width="262.5" height="30"/>
                                         <rect key="frame" x="56.5" y="0.0" width="262.5" height="30"/>
                                         <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                         <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                         <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                         <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -1272,171 +1271,191 @@
                                 </subviews>
                                 </subviews>
                                 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <constraints>
                                 <constraints>
-                                    <constraint firstItem="4tx-eL-rur" firstAttribute="centerY" secondItem="XUY-te-9PN" secondAttribute="centerY" id="AgA-QN-AMl"/>
-                                    <constraint firstItem="4tx-eL-rur" firstAttribute="width" secondItem="XUY-te-9PN" secondAttribute="width" multiplier="0.15" id="C5z-S4-EpK"/>
-                                    <constraint firstItem="ifO-mU-TPV" firstAttribute="centerY" secondItem="XUY-te-9PN" secondAttribute="centerY" id="DDx-b3-3ds"/>
-                                    <constraint firstItem="4tx-eL-rur" firstAttribute="leading" secondItem="XUY-te-9PN" secondAttribute="leading" id="W4J-mY-EF9"/>
-                                    <constraint firstItem="ifO-mU-TPV" firstAttribute="height" secondItem="XUY-te-9PN" secondAttribute="height" id="aKD-k3-Rn6"/>
-                                    <constraint firstItem="4tx-eL-rur" firstAttribute="height" secondItem="XUY-te-9PN" secondAttribute="height" id="msK-d2-NhX"/>
-                                    <constraint firstItem="ifO-mU-TPV" firstAttribute="centerX" secondItem="XUY-te-9PN" secondAttribute="centerX" id="r98-kb-UcD"/>
-                                    <constraint firstItem="ifO-mU-TPV" firstAttribute="width" secondItem="XUY-te-9PN" secondAttribute="width" multiplier="0.7" id="stn-gW-qHw"/>
+                                    <constraint firstItem="FiC-sd-IGL" firstAttribute="centerY" secondItem="Wso-as-8H4" secondAttribute="centerY" id="Bwe-wN-Ciz"/>
+                                    <constraint firstItem="v7W-BZ-qle" firstAttribute="height" secondItem="Wso-as-8H4" secondAttribute="height" id="De6-CZ-soc"/>
+                                    <constraint firstItem="v7W-BZ-qle" firstAttribute="width" secondItem="Wso-as-8H4" secondAttribute="width" multiplier="0.7" id="HFz-HT-150"/>
+                                    <constraint firstItem="v7W-BZ-qle" firstAttribute="centerX" secondItem="Wso-as-8H4" secondAttribute="centerX" id="SH6-iN-gma"/>
+                                    <constraint firstItem="FiC-sd-IGL" firstAttribute="height" secondItem="Wso-as-8H4" secondAttribute="height" id="aAa-nP-JRw"/>
+                                    <constraint firstItem="FiC-sd-IGL" firstAttribute="width" secondItem="Wso-as-8H4" secondAttribute="width" multiplier="0.15" id="fvu-CA-aIr"/>
+                                    <constraint firstItem="FiC-sd-IGL" firstAttribute="leading" secondItem="Wso-as-8H4" secondAttribute="leading" id="pXi-AQ-w7N"/>
+                                    <constraint firstItem="v7W-BZ-qle" firstAttribute="centerY" secondItem="Wso-as-8H4" secondAttribute="centerY" id="rhp-eA-2va"/>
                                 </constraints>
                                 </constraints>
                             </view>
                             </view>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dh0-OE-3US">
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sqd-hf-hGI" userLabel="Cont">
                                 <rect key="frame" x="0.0" y="50" width="375" height="617"/>
                                 <rect key="frame" x="0.0" y="50" width="375" height="617"/>
                                 <subviews>
                                 <subviews>
-                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bqh-wV-GNf" userLabel="Section">
-                                        <rect key="frame" x="10" y="10" width="355" height="597"/>
+                                    <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" bounces="NO" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gqf-Sj-1VO">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="617"/>
                                         <subviews>
                                         <subviews>
-                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" restorationIdentifier="Title" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="esM-2C-p2i" userLabel="Title">
-                                                <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="RzN-hZ-tOL"/>
-                                                </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" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="78P-mw-WXM" userLabel="Content">
-                                                <rect key="frame" x="0.0" y="30" width="355" height="567"/>
+                                            <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kyg-VN-Jc1" userLabel="Section">
+                                                <rect key="frame" x="10" y="10" width="355" height="1954"/>
                                                 <subviews>
                                                 <subviews>
-                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jIN-Yy-3GU" userLabel="Photo">
-                                                        <rect key="frame" x="8" y="8" width="339" height="551"/>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" restorationIdentifier="Title" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pz6-97-sPy" userLabel="Title">
+                                                        <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="den-z0-VST"/>
+                                                        </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" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="2yK-fO-giD" userLabel="Content">
+                                                        <rect key="frame" x="0.0" y="30" width="355" height="1175"/>
                                                         <subviews>
                                                         <subviews>
-                                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="2wg-l8-Thi" userLabel="Image">
-                                                                <rect key="frame" x="10" y="10" width="319" height="413.5"/>
-                                                                <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
-                                                                <userDefinedRuntimeAttributes>
-                                                                    <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
-                                                                        <real key="value" value="2"/>
-                                                                    </userDefinedRuntimeAttribute>
-                                                                    <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
-                                                                        <color key="value" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
-                                                                    </userDefinedRuntimeAttribute>
-                                                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                        <real key="value" value="4"/>
-                                                                    </userDefinedRuntimeAttribute>
-                                                                </userDefinedRuntimeAttributes>
-                                                            </imageView>
-                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="254" text="Date" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vhb-gI-4I7" userLabel="Date">
-                                                                <rect key="frame" x="10.5" y="461" width="319" height="20"/>
-                                                                <constraints>
-                                                                    <constraint firstAttribute="height" constant="20" id="fXM-sB-Ii7"/>
-                                                                </constraints>
-                                                                <fontDescription key="fontDescription" type="italicSystem" pointSize="16"/>
-                                                                <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
-                                                                <nil key="highlightedColor"/>
-                                                            </label>
-                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Jcy-kv-ggg">
-                                                                <rect key="frame" x="10" y="501" width="149.5" height="40"/>
-                                                                <color key="backgroundColor" red="0.070588235289999995" green="0.27058823529999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/>
+                                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qj9-S3-bY4" userLabel="Activity">
+                                                                <rect key="frame" x="8" y="8" width="339" height="200"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="254" text="Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6gj-f6-Ggb" userLabel="Date">
+                                                                        <rect key="frame" x="10" y="10" width="319" height="20"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="height" constant="20" id="9ED-Vw-Zue"/>
+                                                                        </constraints>
+                                                                        <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+                                                                        <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="Ztx-jl-MsD" userLabel="Image">
+                                                                        <rect key="frame" x="0.0" y="40" width="339" height="71"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="height" constant="71" id="s96-BJ-tG9"/>
+                                                                        </constraints>
+                                                                    </imageView>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Text" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s4H-vW-9W1" userLabel="Text">
+                                                                        <rect key="frame" x="17" y="121" width="305.5" height="39"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="254" text="Precio: 0E" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2JU-8j-g42" userLabel="Price">
+                                                                        <rect key="frame" x="10" y="170" width="319" height="20"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="height" constant="20" id="RZA-yo-WR6"/>
+                                                                        </constraints>
+                                                                        <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+                                                                        <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                                                 <constraints>
                                                                 <constraints>
-                                                                    <constraint firstAttribute="height" constant="40" id="voU-YV-2ln"/>
+                                                                    <constraint firstItem="s4H-vW-9W1" firstAttribute="width" secondItem="Qj9-S3-bY4" secondAttribute="width" multiplier="0.9" id="4WU-oP-oyH"/>
+                                                                    <constraint firstItem="Ztx-jl-MsD" firstAttribute="centerX" secondItem="Qj9-S3-bY4" secondAttribute="centerX" id="GVu-8M-yPh"/>
+                                                                    <constraint firstItem="6gj-f6-Ggb" firstAttribute="top" secondItem="Qj9-S3-bY4" secondAttribute="top" constant="10" id="Icg-y4-cOc"/>
+                                                                    <constraint firstItem="2JU-8j-g42" firstAttribute="top" secondItem="s4H-vW-9W1" secondAttribute="bottom" constant="10" id="SjA-hc-Hei"/>
+                                                                    <constraint firstAttribute="bottom" secondItem="2JU-8j-g42" secondAttribute="bottom" constant="10" id="Vlo-eb-rs8"/>
+                                                                    <constraint firstItem="s4H-vW-9W1" firstAttribute="centerX" secondItem="Qj9-S3-bY4" secondAttribute="centerX" id="Vqv-6j-le8"/>
+                                                                    <constraint firstItem="2JU-8j-g42" firstAttribute="width" secondItem="Qj9-S3-bY4" secondAttribute="width" constant="-20" id="ZOe-dR-B4s"/>
+                                                                    <constraint firstItem="s4H-vW-9W1" firstAttribute="top" secondItem="Ztx-jl-MsD" secondAttribute="bottom" constant="10" id="be6-mK-3Ki"/>
+                                                                    <constraint firstItem="2JU-8j-g42" firstAttribute="centerX" secondItem="Qj9-S3-bY4" secondAttribute="centerX" id="gdn-GS-gAm"/>
+                                                                    <constraint firstItem="Ztx-jl-MsD" firstAttribute="top" secondItem="6gj-f6-Ggb" secondAttribute="bottom" constant="10" id="ihO-Xt-zic"/>
+                                                                    <constraint firstItem="6gj-f6-Ggb" firstAttribute="width" secondItem="Qj9-S3-bY4" secondAttribute="width" constant="-20" id="jmb-0t-Hfc"/>
+                                                                    <constraint firstItem="6gj-f6-Ggb" firstAttribute="centerX" secondItem="Qj9-S3-bY4" secondAttribute="centerX" id="me4-rt-RAG"/>
+                                                                    <constraint firstItem="Ztx-jl-MsD" firstAttribute="width" secondItem="Qj9-S3-bY4" secondAttribute="width" id="tZQ-7w-fhB"/>
                                                                 </constraints>
                                                                 </constraints>
-                                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                                                <state key="normal" title="&lt;">
-                                                                    <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                                                                </state>
+                                                                <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                                                                 <userDefinedRuntimeAttributes>
                                                                 <userDefinedRuntimeAttributes>
                                                                     <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
                                                                     <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
-                                                                        <color key="value" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                                        <color key="value" red="0.42745098040000001" green="0.41176470590000003" blue="0.56470588239999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                     </userDefinedRuntimeAttribute>
                                                                     </userDefinedRuntimeAttribute>
                                                                     <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
                                                                     <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
-                                                                        <real key="value" value="2"/>
+                                                                        <real key="value" value="1"/>
                                                                     </userDefinedRuntimeAttribute>
                                                                     </userDefinedRuntimeAttribute>
                                                                     <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                                                                     <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                        <real key="value" value="4"/>
+                                                                        <real key="value" value="3"/>
                                                                     </userDefinedRuntimeAttribute>
                                                                     </userDefinedRuntimeAttribute>
                                                                 </userDefinedRuntimeAttributes>
                                                                 </userDefinedRuntimeAttributes>
-                                                            </button>
-                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HOD-9J-wQK">
-                                                                <rect key="frame" x="179.5" y="501" width="149.5" height="40"/>
-                                                                <color key="backgroundColor" red="0.070588235289999995" green="0.27058823529999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/>
+                                                            </view>
+                                                            <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HZX-gN-1YI" userLabel="Itinerary">
+                                                                <rect key="frame" x="8" y="218" width="339" height="949"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Itinerario" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cjj-sd-Gou" userLabel="Title">
+                                                                        <rect key="frame" x="10" y="10" width="319" height="21.5"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="height" constant="21.5" id="2zz-qZ-PEW"/>
+                                                                        </constraints>
+                                                                        <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+                                                                        <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="3lO-kN-Y0S">
+                                                                        <rect key="frame" x="9.5" y="374" width="319" height="200"/>
+                                                                    </stackView>
+                                                                </subviews>
+                                                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                                                 <constraints>
                                                                 <constraints>
-                                                                    <constraint firstAttribute="height" constant="40" id="6oc-MW-3JE"/>
+                                                                    <constraint firstItem="3lO-kN-Y0S" firstAttribute="width" secondItem="HZX-gN-1YI" secondAttribute="width" constant="-20" id="Hz4-jl-pQ1"/>
+                                                                    <constraint firstItem="3lO-kN-Y0S" firstAttribute="top" secondItem="cjj-sd-Gou" secondAttribute="bottom" constant="10" id="Okn-6j-Z72"/>
+                                                                    <constraint firstItem="cjj-sd-Gou" firstAttribute="width" secondItem="HZX-gN-1YI" secondAttribute="width" constant="-20" id="Vpb-9J-POY"/>
+                                                                    <constraint firstAttribute="bottom" secondItem="3lO-kN-Y0S" secondAttribute="bottom" constant="10" id="hpN-tm-PLc"/>
+                                                                    <constraint firstItem="cjj-sd-Gou" firstAttribute="centerX" secondItem="HZX-gN-1YI" secondAttribute="centerX" id="qlD-cC-2hf"/>
+                                                                    <constraint firstItem="cjj-sd-Gou" firstAttribute="top" secondItem="HZX-gN-1YI" secondAttribute="top" constant="10" id="sUG-Wx-Qba"/>
+                                                                    <constraint firstItem="3lO-kN-Y0S" firstAttribute="centerX" secondItem="HZX-gN-1YI" secondAttribute="centerX" id="tpQ-ml-ORh"/>
                                                                 </constraints>
                                                                 </constraints>
-                                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                                                <state key="normal" title="&gt;">
-                                                                    <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                                                                </state>
+                                                                <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                                                                 <userDefinedRuntimeAttributes>
                                                                 <userDefinedRuntimeAttributes>
                                                                     <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
                                                                     <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
-                                                                        <color key="value" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                                        <color key="value" red="0.42745098040000001" green="0.41176470590000003" blue="0.56470588239999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                     </userDefinedRuntimeAttribute>
                                                                     </userDefinedRuntimeAttribute>
                                                                     <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
                                                                     <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
-                                                                        <real key="value" value="2"/>
+                                                                        <real key="value" value="1"/>
                                                                     </userDefinedRuntimeAttribute>
                                                                     </userDefinedRuntimeAttribute>
                                                                     <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                                                                     <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                        <real key="value" value="4"/>
+                                                                        <real key="value" value="3"/>
                                                                     </userDefinedRuntimeAttribute>
                                                                     </userDefinedRuntimeAttribute>
                                                                 </userDefinedRuntimeAttributes>
                                                                 </userDefinedRuntimeAttributes>
-                                                            </button>
+                                                            </view>
                                                         </subviews>
                                                         </subviews>
-                                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                                                        <constraints>
-                                                            <constraint firstItem="2wg-l8-Thi" firstAttribute="top" secondItem="jIN-Yy-3GU" secondAttribute="top" constant="10" id="D28-DF-HF9"/>
-                                                            <constraint firstAttribute="bottom" secondItem="Jcy-kv-ggg" secondAttribute="bottom" constant="10" id="HPg-ft-VEj"/>
-                                                            <constraint firstItem="2wg-l8-Thi" firstAttribute="centerX" secondItem="jIN-Yy-3GU" secondAttribute="centerX" id="KoA-A3-Ygf"/>
-                                                            <constraint firstItem="Vhb-gI-4I7" firstAttribute="bottom" secondItem="HOD-9J-wQK" secondAttribute="top" constant="-20" id="NVj-fY-b6d"/>
-                                                            <constraint firstAttribute="trailing" secondItem="HOD-9J-wQK" secondAttribute="trailing" constant="10" id="can-PT-Neg"/>
-                                                            <constraint firstAttribute="bottom" secondItem="HOD-9J-wQK" secondAttribute="bottom" constant="10" id="dsJ-0z-vOa"/>
-                                                            <constraint firstItem="Vhb-gI-4I7" firstAttribute="width" secondItem="jIN-Yy-3GU" secondAttribute="width" constant="-20" id="geF-9Y-pxJ"/>
-                                                            <constraint firstItem="Jcy-kv-ggg" firstAttribute="leading" secondItem="jIN-Yy-3GU" secondAttribute="leading" constant="10" id="grR-FP-FE3"/>
-                                                            <constraint firstItem="Vhb-gI-4I7" firstAttribute="centerX" secondItem="jIN-Yy-3GU" secondAttribute="centerX" id="hDr-cv-Tma"/>
-                                                            <constraint firstItem="HOD-9J-wQK" firstAttribute="width" secondItem="jIN-Yy-3GU" secondAttribute="width" multiplier="0.5" constant="-20" id="pQ0-vJ-Uv1"/>
-                                                            <constraint firstItem="Jcy-kv-ggg" firstAttribute="width" secondItem="jIN-Yy-3GU" secondAttribute="width" multiplier="0.5" constant="-20" id="rnQ-m4-XQ0"/>
-                                                            <constraint firstItem="2wg-l8-Thi" firstAttribute="height" secondItem="jIN-Yy-3GU" secondAttribute="height" multiplier="0.75" id="vhz-lJ-2fm"/>
-                                                            <constraint firstItem="2wg-l8-Thi" firstAttribute="width" secondItem="jIN-Yy-3GU" secondAttribute="width" constant="-20" id="wQB-Hs-vSs"/>
-                                                        </constraints>
+                                                        <color key="backgroundColor" red="0.59607843140000005" green="0.7843137255" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                                         <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                                                         <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
-                                                        <userDefinedRuntimeAttributes>
-                                                            <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
-                                                                <color key="value" red="0.42745098040000001" green="0.41176470590000003" blue="0.56470588239999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            </userDefinedRuntimeAttribute>
-                                                            <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
-                                                                <real key="value" value="1"/>
-                                                            </userDefinedRuntimeAttribute>
-                                                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                <real key="value" value="3"/>
-                                                            </userDefinedRuntimeAttribute>
-                                                        </userDefinedRuntimeAttributes>
-                                                    </view>
+                                                    </stackView>
                                                 </subviews>
                                                 </subviews>
                                                 <color key="backgroundColor" red="0.59607843140000005" green="0.7843137255" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                                 <color key="backgroundColor" red="0.59607843140000005" green="0.7843137255" blue="1" alpha="1" colorSpace="calibratedRGB"/>
-                                                <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
-                                            </stackView>
+                                                <constraints>
+                                                    <constraint firstItem="pz6-97-sPy" firstAttribute="centerX" secondItem="kyg-VN-Jc1" secondAttribute="centerX" id="Fdn-EI-QGl"/>
+                                                    <constraint firstItem="2yK-fO-giD" firstAttribute="centerX" secondItem="kyg-VN-Jc1" secondAttribute="centerX" id="kDg-sI-VYI"/>
+                                                    <constraint firstAttribute="bottom" secondItem="2yK-fO-giD" secondAttribute="bottom" id="ogx-5T-Dfd"/>
+                                                    <constraint firstItem="2yK-fO-giD" firstAttribute="top" secondItem="pz6-97-sPy" secondAttribute="bottom" id="qPT-dv-eVg"/>
+                                                    <constraint firstItem="pz6-97-sPy" firstAttribute="width" secondItem="kyg-VN-Jc1" secondAttribute="width" id="qWi-1Z-VWQ"/>
+                                                    <constraint firstItem="2yK-fO-giD" firstAttribute="width" secondItem="kyg-VN-Jc1" secondAttribute="width" id="rY6-hl-afc"/>
+                                                    <constraint firstItem="pz6-97-sPy" firstAttribute="top" secondItem="kyg-VN-Jc1" secondAttribute="top" id="sw5-Qt-DUd"/>
+                                                </constraints>
+                                                <edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
+                                                <userDefinedRuntimeAttributes>
+                                                    <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                                        <color key="value" red="0.0" green="0.0" blue="0.066666666669999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                    </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>
                                         </subviews>
                                         </subviews>
-                                        <color key="backgroundColor" red="0.59607843140000005" green="0.7843137255" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                        <color key="backgroundColor" red="0.70980392160000005" green="0.82745098039999998" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <constraints>
                                         <constraints>
-                                            <constraint firstAttribute="bottom" secondItem="78P-mw-WXM" secondAttribute="bottom" id="JdO-O4-mee"/>
-                                            <constraint firstItem="esM-2C-p2i" firstAttribute="top" secondItem="bqh-wV-GNf" secondAttribute="top" id="KOQ-eg-hXm"/>
-                                            <constraint firstItem="78P-mw-WXM" firstAttribute="width" secondItem="bqh-wV-GNf" secondAttribute="width" id="PpI-M2-bDk"/>
-                                            <constraint firstItem="78P-mw-WXM" firstAttribute="centerX" secondItem="bqh-wV-GNf" secondAttribute="centerX" id="bEw-TV-GOh"/>
-                                            <constraint firstItem="78P-mw-WXM" firstAttribute="top" secondItem="esM-2C-p2i" secondAttribute="bottom" id="muK-Pd-v3M"/>
-                                            <constraint firstItem="esM-2C-p2i" firstAttribute="width" secondItem="bqh-wV-GNf" secondAttribute="width" id="vEo-Fa-qdK"/>
-                                            <constraint firstItem="esM-2C-p2i" firstAttribute="centerX" secondItem="bqh-wV-GNf" secondAttribute="centerX" id="zPh-03-gDc"/>
+                                            <constraint firstItem="kyg-VN-Jc1" firstAttribute="trailing" secondItem="Gqf-Sj-1VO" secondAttribute="trailing" constant="10" id="4CW-W7-4ND"/>
+                                            <constraint firstItem="kyg-VN-Jc1" firstAttribute="top" secondItem="Gqf-Sj-1VO" secondAttribute="top" constant="10" id="fyr-qO-Cdl"/>
+                                            <constraint firstItem="kyg-VN-Jc1" firstAttribute="centerX" secondItem="Gqf-Sj-1VO" secondAttribute="centerX" id="hjI-3k-lKK"/>
+                                            <constraint firstItem="kyg-VN-Jc1" firstAttribute="leading" secondItem="Gqf-Sj-1VO" secondAttribute="leading" constant="10" id="hmA-Z3-r1z"/>
+                                            <constraint firstAttribute="bottom" secondItem="kyg-VN-Jc1" secondAttribute="bottom" constant="10" id="nGV-76-wZo"/>
                                         </constraints>
                                         </constraints>
                                         <edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
                                         <edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
                                         <userDefinedRuntimeAttributes>
                                         <userDefinedRuntimeAttributes>
-                                            <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
-                                                <color key="value" red="0.0" green="0.0" blue="0.066666666669999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                            </userDefinedRuntimeAttribute>
                                             <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
                                             <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
-                                                <real key="value" value="1"/>
-                                            </userDefinedRuntimeAttribute>
-                                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                <real key="value" value="8"/>
+                                                <real key="value" value="0.0"/>
                                             </userDefinedRuntimeAttribute>
                                             </userDefinedRuntimeAttribute>
                                         </userDefinedRuntimeAttributes>
                                         </userDefinedRuntimeAttributes>
-                                    </view>
+                                    </scrollView>
                                 </subviews>
                                 </subviews>
-                                <color key="backgroundColor" red="0.70980392160000005" green="0.82745098039999998" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <constraints>
                                 <constraints>
-                                    <constraint firstItem="bqh-wV-GNf" firstAttribute="width" secondItem="dh0-OE-3US" secondAttribute="width" constant="-20" id="8a3-am-7Ch"/>
-                                    <constraint firstItem="bqh-wV-GNf" firstAttribute="height" secondItem="dh0-OE-3US" secondAttribute="height" constant="-20" id="Tgd-YQ-aEQ"/>
-                                    <constraint firstItem="bqh-wV-GNf" firstAttribute="centerY" secondItem="dh0-OE-3US" secondAttribute="centerY" id="U2v-3X-Ub1"/>
-                                    <constraint firstItem="bqh-wV-GNf" firstAttribute="centerX" secondItem="dh0-OE-3US" secondAttribute="centerX" id="eI3-vW-bvZ"/>
+                                    <constraint firstItem="Gqf-Sj-1VO" firstAttribute="width" secondItem="Sqd-hf-hGI" secondAttribute="width" id="RkS-ku-LcK"/>
+                                    <constraint firstItem="Gqf-Sj-1VO" firstAttribute="centerX" secondItem="Sqd-hf-hGI" secondAttribute="centerX" id="bTt-jg-jEg"/>
+                                    <constraint firstItem="Gqf-Sj-1VO" firstAttribute="top" secondItem="Sqd-hf-hGI" secondAttribute="top" id="wgm-EO-9Fw"/>
+                                    <constraint firstAttribute="bottom" secondItem="Gqf-Sj-1VO" secondAttribute="bottom" id="zBV-o0-Ah0"/>
                                 </constraints>
                                 </constraints>
                                 <userDefinedRuntimeAttributes>
                                 <userDefinedRuntimeAttributes>
                                     <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
                                     <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
@@ -1447,27 +1466,30 @@
                         </subviews>
                         </subviews>
                         <color key="backgroundColor" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <color key="backgroundColor" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
                         <constraints>
-                            <constraint firstItem="XUY-te-9PN" firstAttribute="width" secondItem="zXb-Ja-8dX" secondAttribute="width" id="1gg-3z-VTT"/>
-                            <constraint firstItem="XUY-te-9PN" firstAttribute="top" secondItem="iD5-7d-BcL" secondAttribute="bottom" id="6xm-50-tbJ"/>
-                            <constraint firstItem="dh0-OE-3US" firstAttribute="top" secondItem="XUY-te-9PN" secondAttribute="bottom" id="Cwk-RG-Bdj"/>
-                            <constraint firstItem="dh0-OE-3US" firstAttribute="centerX" secondItem="zXb-Ja-8dX" secondAttribute="centerX" id="FEt-9c-pvb"/>
-                            <constraint firstItem="dh0-OE-3US" firstAttribute="width" secondItem="zXb-Ja-8dX" secondAttribute="width" id="MlH-pm-QQM"/>
-                            <constraint firstItem="XUY-te-9PN" firstAttribute="centerX" secondItem="zXb-Ja-8dX" secondAttribute="centerX" id="vfQ-Yn-21i"/>
-                            <constraint firstItem="UVa-jE-Gqw" firstAttribute="top" secondItem="dh0-OE-3US" secondAttribute="bottom" id="w47-kr-EXB"/>
+                            <constraint firstItem="Sqd-hf-hGI" firstAttribute="width" secondItem="Tll-v9-w0T" secondAttribute="width" id="4Oi-mE-zRB"/>
+                            <constraint firstItem="Sqd-hf-hGI" firstAttribute="top" secondItem="Wso-as-8H4" secondAttribute="bottom" id="5pc-Qo-6wP"/>
+                            <constraint firstItem="Sqd-hf-hGI" firstAttribute="centerX" secondItem="Tll-v9-w0T" secondAttribute="centerX" id="D9r-lY-5aj"/>
+                            <constraint firstItem="94e-TO-KhL" firstAttribute="top" secondItem="Sqd-hf-hGI" secondAttribute="bottom" id="F8t-mE-en5"/>
+                            <constraint firstItem="Wso-as-8H4" firstAttribute="top" secondItem="yac-Xq-lM3" secondAttribute="bottom" id="Ip2-eX-rdk"/>
+                            <constraint firstItem="Wso-as-8H4" firstAttribute="centerX" secondItem="Tll-v9-w0T" secondAttribute="centerX" id="Mxx-Zd-rFC"/>
+                            <constraint firstItem="Wso-as-8H4" firstAttribute="width" secondItem="Tll-v9-w0T" secondAttribute="width" id="gSn-Ue-Gl1"/>
                         </constraints>
                         </constraints>
                     </view>
                     </view>
                     <connections>
                     <connections>
-                        <outlet property="barButton" destination="4tx-eL-rur" id="fAC-j7-Kuv"/>
-                        <outlet property="barTitle" destination="ifO-mU-TPV" id="Yba-nJ-MyQ"/>
-                        <outlet property="btNext" destination="HOD-9J-wQK" id="mc4-j1-seA"/>
-                        <outlet property="btPrev" destination="Jcy-kv-ggg" id="L1Q-2X-H43"/>
-                        <outlet property="photoDate" destination="Vhb-gI-4I7" id="pyP-a1-Iz7"/>
-                        <outlet property="photoImage" destination="2wg-l8-Thi" id="xgu-JA-6Zs"/>
-                        <outlet property="photoTitle" destination="esM-2C-p2i" id="ev5-QE-lS6"/>
+                        <outlet property="activityDate" destination="6gj-f6-Ggb" id="eBH-rF-6p2"/>
+                        <outlet property="activityImage" destination="Ztx-jl-MsD" id="kAh-WI-jsg"/>
+                        <outlet property="activityPrice" destination="2JU-8j-g42" id="0na-jU-hcv"/>
+                        <outlet property="activityText" destination="s4H-vW-9W1" id="edz-vu-9kL"/>
+                        <outlet property="activityTitle" destination="pz6-97-sPy" id="QFy-g3-k0u"/>
+                        <outlet property="barButton" destination="FiC-sd-IGL" id="cbn-gb-Nj5"/>
+                        <outlet property="barTitle" destination="v7W-BZ-qle" id="aQB-IA-P19"/>
+                        <outlet property="itineraryContainer" destination="HZX-gN-1YI" id="1lZ-0m-TwZ"/>
+                        <outlet property="itineraryList" destination="3lO-kN-Y0S" id="Vf3-t6-l0Y"/>
                     </connections>
                     </connections>
                 </viewController>
                 </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="jtA-t8-aan" userLabel="First Responder" sceneMemberID="firstResponder"/>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="IHt-fO-2Q0" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
             </objects>
+            <point key="canvasLocation" x="1302" y="-403"/>
         </scene>
         </scene>
     </scenes>
     </scenes>
     <resources>
     <resources>
@@ -1475,7 +1497,4 @@
         <image name="Logo" width="83" height="83"/>
         <image name="Logo" width="83" height="83"/>
         <image name="PhotoPlaceholder" width="170" height="108"/>
         <image name="PhotoPlaceholder" width="170" height="108"/>
     </resources>
     </resources>
-    <inferredMetricsTieBreakers>
-        <segue reference="ftR-BO-YPe"/>
-    </inferredMetricsTieBreakers>
 </document>
 </document>

+ 3 - 3
app/BlogView.swift

@@ -62,7 +62,7 @@ class BlogView: UIView {
 		self.storyboard = UIStoryboard(name: "Main", bundle: nil)
 		self.storyboard = UIStoryboard(name: "Main", bundle: nil)
 		self.controller = storyboard?.instantiateViewController(withIdentifier: "GMViewController") as! ViewController
 		self.controller = storyboard?.instantiateViewController(withIdentifier: "GMViewController") as! ViewController
 		self.context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		self.context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
-		self.delegate = UIApplication.shared.delegate as! AppDelegate
+		self.delegate = UIApplication.shared.delegate as? AppDelegate
 		self.lang = getLanguage()
 		self.lang = getLanguage()
 		self.context?.persistentStoreCoordinator = delegate?.persistentStoreCoordinator
 		self.context?.persistentStoreCoordinator = delegate?.persistentStoreCoordinator
 		
 		
@@ -95,7 +95,7 @@ class BlogView: UIView {
 			var text: String
 			var text: String
 			var image: String
 			var image: String
 			
 			
-			for r in searchResults as! [NSManagedObject] {
+			for r in searchResults! {
 								
 								
 				//Create a new row
 				//Create a new row
 				row = RowBlog.init(s: "rowBlog\(count)", i: count)
 				row = RowBlog.init(s: "rowBlog\(count)", i: count)
@@ -116,7 +116,7 @@ class BlogView: UIView {
 				imgFetchRequest.fetchLimit = 1
 				imgFetchRequest.fetchLimit = 1
 				do{
 				do{
 					let imgSearchResults = try context?.fetch(imgFetchRequest)
 					let imgSearchResults = try context?.fetch(imgFetchRequest)
-					for imgR in imgSearchResults as! [NSManagedObject]{
+					for imgR in imgSearchResults!{
 						image = imgR.value(forKey: "image")! as! String
 						image = imgR.value(forKey: "image")! as! String
 						row.setImage(filename: image)
 						row.setImage(filename: image)
 					}
 					}

+ 309 - 0
app/FutureActivityViewController.swift

@@ -0,0 +1,309 @@
+// 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 UIKit
+import CoreData
+
+/**
+Controller to show a future activity.
+*/
+class FutureActivityViewController: UIViewController, UIGestureRecognizerDelegate {
+	
+	@IBOutlet weak var barButton: UIButton!
+	@IBOutlet weak var barTitle: UILabel!
+	@IBOutlet weak var activityTitle: UILabel!
+	@IBOutlet weak var activityImage: UIImageView!
+	@IBOutlet weak var activityText: UILabel!
+	@IBOutlet weak var activityDate: UILabel!
+	@IBOutlet weak var itineraryContainer: UIView!
+	@IBOutlet weak var itineraryList: UIStackView!
+	@IBOutlet weak var activityPrice: UILabel!
+	
+	// Activity id
+	var id: Int = -1
+	
+	var delegate: AppDelegate?
+	
+	var passId: Int = -1
+	
+	
+	/**
+	Get the app context.
+	:return: The app context.
+	*/
+	func getContext () -> NSManagedObjectContext {
+		return NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType)
+	}
+	
+	
+	/**
+	Run when the app loads.
+	*/
+	override func viewDidLoad() {
+		super.viewDidLoad()
+		self.loadActivity(id: id)
+		// Set button action
+		barButton.addTarget(self, action: #selector(self.back), for: .touchUpInside)
+	}
+	
+	
+	/**
+	Dismisses the controller.
+	*/
+	func back() {
+		self.dismiss(animated: true, completion: nil)
+	}
+	
+	
+	/**
+	Dispose of any resources that can be recreated.
+	*/
+	override func didReceiveMemoryWarning() {
+		super.didReceiveMemoryWarning()
+	}
+	
+	
+	/**
+	Loads the selected post.
+	:param: id Post id.
+	*/
+	public func loadActivity(id: Int){
+		
+		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
+		let appDelegate = UIApplication.shared.delegate as! AppDelegate
+		let lang : String = getLanguage()
+		context.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
+		let fetchRequest: NSFetchRequest<Activity> = Activity.fetchRequest()
+		fetchRequest.predicate = NSPredicate(format: "id = %i", id)
+		
+		do {
+			let searchResults = try context.fetch(fetchRequest)
+			var count = 0
+			var sTitle: String
+			var sText: String
+			var image: String
+			var date: NSDate
+			var price: Int
+			
+			for r in searchResults as [NSManagedObject] {
+				count = count + 1
+				sTitle = r.value(forKey: "title_\(lang)")! as! String
+				sText = r.value(forKey: "text_\(lang)")! as! String
+				date = r.value(forKey: "date")! as! NSDate
+				price = r.value(forKey: "price")! as! Int
+				activityTitle.text = "  \(sTitle.decode().stripHtml())"
+				activityText.text = sText.decode().stripHtml()
+				activityDate.text = formatDate(date: date, lang: lang)
+				activityPrice.text = "Precio: \(price) €"
+				
+				// Get main image
+				image = ""
+				let imgFetchRequest: NSFetchRequest<Activity_image> = Activity_image.fetchRequest()
+				let imgSortDescriptor = NSSortDescriptor(key: "idx", ascending: true)
+				let imgSortDescriptors = [imgSortDescriptor]
+				imgFetchRequest.sortDescriptors = imgSortDescriptors
+				imgFetchRequest.predicate = NSPredicate(format: "activity == %i", id)
+				imgFetchRequest.fetchLimit = 1
+				do{
+					let imgSearchResults = try context.fetch(imgFetchRequest)
+					for imgR in imgSearchResults as [NSManagedObject]{
+						image = imgR.value(forKey: "image")! as! String
+						let path = "img/actividades/preview/\(image)"
+						self.activityImage.setImage(localPath: path, remotePath: "https://margolariak.com/\(path)")
+					}
+				}
+				catch {
+					NSLog(":FUTUREACTIVITYCONTROLLER:ERROR: Error getting image for past activity \(id): \(error)")
+				}
+				
+				// Get itinerary
+				let itiFetchRequest: NSFetchRequest<Activity_itinerary> = Activity_itinerary.fetchRequest()
+				let itiSortDescriptor = NSSortDescriptor(key: "start", ascending: true)
+				let itiSortDescriptors = [itiSortDescriptor]
+				itiFetchRequest.sortDescriptors = itiSortDescriptors
+				itiFetchRequest.predicate = NSPredicate(format: "activity == %i", id)
+				do {
+					let itiSearchResults = try context.fetch(itiFetchRequest)
+					if itiSearchResults.count == 0{
+						NSLog(":FUTUREACTIVITY:DEBUG: No itinerary for activity \(id)")
+						self.itineraryContainer.isHidden = true
+					}
+					else{
+					
+						var row: RowItinerary
+						var count = 0
+						var itiId: Int
+						var itiTitle: String
+						var itiText: String
+						var itiPlace: Int
+						var itiStart: NSDate
+						var place: [String]
+					
+						for r in itiSearchResults {
+							count = count + 1
+						
+							// Create a new row
+							row = RowItinerary.init(s: "rowItinerary\(count)", i: count)
+							itiId = r.value(forKey: "id")! as! Int
+							itiTitle = r.value(forKey: "name_\(lang)")! as! String
+							itiText = r.value(forKey: "description_\(lang)")! as! String
+							itiStart = r.value(forKey: "start")! as! NSDate
+							itiPlace = r.value(forKey: "place")! as! Int
+							place = getPlace(place: itiPlace, lang: lang, context: context)
+														
+							row.setTitle(text: itiTitle)
+							row.setText(text: itiText)
+							row.setStart(str: formatTime(date: itiStart))
+							row.setPlace(place: place[0], address: place[1])
+							row.id = id
+						
+							self.itineraryList?.addArrangedSubview(row)
+						}
+						self.itineraryList?.setNeedsLayout()
+						self.itineraryList?.layoutIfNeeded()
+						
+					}
+				}
+				catch {
+					NSLog(":FUTUREACTIVITY:ERROR: Error getting itinerary: \(error)")
+				}
+			}
+		} catch {
+			NSLog(":FUTUREACTIVITYCONTROLLER:ERROR: Error loading past activity: \(error)")
+		}
+	}
+	
+	
+	/**
+	Formats a date to the desired language.
+	:param: text The date.
+	:param: lang Device language (only 'es', 'en', or 'eu').
+	*/
+	func formatDate(date: NSDate, lang: String) -> String{
+		
+		let months_es = ["0index", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"]
+		let months_en = ["0index", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
+		let months_eu = ["0index", "urtarrilaren", "otsailaren", "martxoaren", "abrilaren", "maiatzaren", "ekainaren", "ustailaren", "abustuaren", "irailaren", "urriaren", "azaroaren", "abenduaren"]
+		let days_es = ["0index", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sábado", "Domingo"]
+		let days_en = ["0index", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
+		let days_eu = ["0index", "Astelehena", "Asteartea", "Asteazkena", "Osteguna", "Ostirala", "Larumbata", "Igandea"]
+		
+		let calendar = Calendar.current
+		let day = calendar.component(.day, from: date as Date)
+		let month = calendar.component(.month, from: date as Date)
+		let weekday = calendar.component(.weekday, from: date as Date)
+		var strDate = ""
+		
+		switch lang{
+		case "en":
+			
+			var dayNum = ""
+			switch day{
+			case 1:
+				dayNum = "1th"
+				break
+			case 2:
+				dayNum = "2nd"
+				break;
+			case 3:
+				dayNum = "3rd"
+				break;
+			default:
+				dayNum = "\(weekday)th"
+			}
+			
+			strDate = "\(days_en[weekday]), \(months_en[month]) \(dayNum)"
+			break
+		case "eu":
+			strDate = "\(days_eu[weekday]) \(months_eu[month]) \(day)an"
+			break
+		default:
+			strDate = "\(days_es[weekday]) \(day) de \(months_es[month])"
+		}
+		
+		return strDate
+	}
+	
+	
+	/**
+	Extracts the time from a date to a string.
+	:param: text The date.
+	:return: Time, in string format.
+	*/
+	func formatTime(date: NSDate) -> String{
+
+		let calendar = Calendar.current
+		let hour: Int = calendar.component(.hour, from: date as Date)
+		let minute: Int = calendar.component(.minute, from: date as Date)
+		
+		var strTime = ""
+		if minute <= 9{
+			strTime = "\(hour):0\(minute)"
+		}
+		else{
+			strTime = "\(hour):\(minute)"
+		}
+		
+		return strTime
+	}
+	
+	
+	/**
+	Gets info about a place in the device language.
+	:param: place Place id.
+	:param: lang Device language (only 'es', 'en', or 'eu').
+	:param: context Application context.
+	:return: String array. 0-index item contains the place name. The 1-index one contains the address.
+	*/
+	func getPlace(place: Int, lang: String, context: NSManagedObjectContext) -> [String]{
+		var placeName = ""
+		var placeAddress = ""
+		let fetchRequest: NSFetchRequest<Place> = Place.fetchRequest()
+		fetchRequest.predicate = NSPredicate(format: "id = %i", place)
+		do {
+			let searchResults = try context.fetch(fetchRequest)
+			let r: NSManagedObject = searchResults[0]
+			placeName = r.value(forKey: "name_\(lang)")! as! String
+			placeAddress = r.value(forKey: "address_\(lang)")! as! String
+		}
+		catch{
+			NSLog(":FUTUREACTIVITY:ERROR: Error getting infor about place \(place): \(error)")
+		}
+		return [placeName, placeAddress]
+	}
+	
+	
+	/**
+	Gets the device language. The only recognized languages are Spanish, English and Basque.
+	If the device has another language, Spanish will be selected by default.
+	:return: Two-letter language code.
+	*/
+	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"
+		}
+	}
+	
+}
+

+ 3 - 3
app/GalleryView.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
         <adaptation id="fullscreen"/>
     </device>
     </device>
     <dependencies>
     <dependencies>
         <deployment identifier="iOS"/>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     </dependencies>
     <objects>
     <objects>
@@ -24,7 +24,7 @@
                 <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aoy-Mh-gpR">
                 <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aoy-Mh-gpR">
                     <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                     <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                     <subviews>
                     <subviews>
-                        <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" axis="vertical" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="ULw-PH-L95">
+                        <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="ULw-PH-L95">
                             <rect key="frame" x="0.0" y="0.0" width="375" height="3000"/>
                             <rect key="frame" x="0.0" y="0.0" width="375" height="3000"/>
                             <subviews>
                             <subviews>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3TY-0K-6q1" customClass="Section" customModule="app">
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3TY-0K-6q1" customClass="Section" customModule="app">

+ 2 - 2
app/Info.plist

@@ -17,9 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
 	<key>CFBundleShortVersionString</key>
-	<string>0.0.7</string>
+	<string>0.1.1</string>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
-	<string>8</string>
+	<string>11</string>
 	<key>LSRequiresIPhoneOS</key>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<true/>
 	<key>NSLocationWhenInUseUsageDescription</key>
 	<key>NSLocationWhenInUseUsageDescription</key>

+ 0 - 1
app/PhotoViewController.swift

@@ -164,7 +164,6 @@ class PhotoViewController: UIViewController, UIGestureRecognizerDelegate {
 			let searchResults = try context.fetch(fetchRequest)
 			let searchResults = try context.fetch(fetchRequest)
 			
 			
 			var sTitle: String
 			var sTitle: String
-			var sText: String
 			var image: String
 			var image: String
 			var date: NSDate
 			var date: NSDate
 			
 			

+ 1 - 1
app/RowAlbum.swift

@@ -53,7 +53,7 @@ Extension of UIView to be formatted as sections.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first
+		nib.instantiate(withOwner: self, options: nil)
 		
 		
 		self.frame = self.bounds
 		self.frame = self.bounds
 		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
 		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]

+ 1 - 1
app/RowBlog.swift

@@ -51,7 +51,7 @@ Extension of UIView to be formatted as post rows.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first as! UIView
+		nib.instantiate(withOwner: self, options: nil)
 	}
 	}
 	
 	
 	
 	

+ 2 - 2
app/RowFutureActivity.swift

@@ -54,7 +54,7 @@ Extension of UIView to be formatted as future activity rows.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first
+		nib.instantiate(withOwner: self, options: nil)
 	}
 	}
 	
 	
 	
 	
@@ -204,6 +204,6 @@ Extension of UIView to be formatted as future activity rows.
 	*/
 	*/
 	func openActivity(_ sender:UITapGestureRecognizer? = nil){
 	func openActivity(_ sender:UITapGestureRecognizer? = nil){
 		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
 		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
-		delegate.controller?.showPastActivity(id: self.id)
+		delegate.controller?.showFutureActivity(id: self.id)
 	}
 	}
 }
 }

+ 16 - 15
app/RowFutureActivity.xib

@@ -27,10 +27,10 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LXM-17-fy1" userLabel="Container">
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LXM-17-fy1" userLabel="Container">
-                    <rect key="frame" x="0.0" y="263.5" width="375" height="140"/>
+                    <rect key="frame" x="0.0" y="248.5" width="375" height="170"/>
                     <subviews>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Oax-mA-mEd" userLabel="Entry">
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Oax-mA-mEd" userLabel="Entry">
-                            <rect key="frame" x="10" y="10" width="355" height="140"/>
+                            <rect key="frame" x="10" y="10" width="355" height="170"/>
                             <subviews>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vd3-c0-iYd" userLabel="Title">
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vd3-c0-iYd" userLabel="Title">
                                     <rect key="frame" x="10" y="10" width="335" height="22"/>
                                     <rect key="frame" x="10" y="10" width="335" height="22"/>
@@ -39,35 +39,36 @@
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pCj-dq-5rF" userLabel="Date">
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pCj-dq-5rF" userLabel="Date">
-                                    <rect key="frame" x="14.5" y="32" width="325" height="21"/>
-                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                    <rect key="frame" x="9.5" y="40" width="335" height="21"/>
+                                    <fontDescription key="fontDescription" type="italicSystem" pointSize="17"/>
                                     <color key="textColor" red="0.15294117647058825" green="0.33333333333333331" blue="0.45098039215686275" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="textColor" red="0.15294117647058825" green="0.33333333333333331" blue="0.45098039215686275" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="xIf-kY-gPW" userLabel="Image">
                                 <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="xIf-kY-gPW" userLabel="Image">
+                                    <rect key="frame" x="10" y="69" width="71" height="64"/>
                                     <rect key="frame" x="10" y="53" width="71" height="64"/>
                                     <rect key="frame" x="10" y="53" width="71" height="64"/>
                                     <constraints>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="64" id="GGt-lC-syI"/>
                                         <constraint firstAttribute="height" constant="64" id="GGt-lC-syI"/>
                                     </constraints>
                                     </constraints>
                                 </imageView>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m6I-vy-k36" userLabel="Text">
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m6I-vy-k36" userLabel="Text">
-                                    <rect key="frame" x="97" y="53" width="248" height="21"/>
+                                    <rect key="frame" x="97" y="61" width="248" height="21"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                     <nil key="textColor"/>
                                     <nil key="textColor"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VQF-xA-wca" userLabel="City">
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VQF-xA-wca" userLabel="City">
-                                    <rect key="frame" x="20" y="119" width="275" height="21"/>
-                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                    <rect key="frame" x="10" y="144" width="275" height="21"/>
+                                    <fontDescription key="fontDescription" type="italicSystem" pointSize="17"/>
                                     <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U3K-kD-4pK" userLabel="Price">
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U3K-kD-4pK" userLabel="Price">
-                                    <rect key="frame" x="285" y="119" width="50" height="21"/>
+                                    <rect key="frame" x="285" y="144" width="50" height="21"/>
                                     <constraints>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="50" id="uI7-D4-q0g"/>
                                         <constraint firstAttribute="width" constant="50" id="uI7-D4-q0g"/>
                                     </constraints>
                                     </constraints>
-                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                    <fontDescription key="fontDescription" type="italicSystem" pointSize="17"/>
                                     <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
@@ -75,7 +76,7 @@
                             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                             <constraints>
                             <constraints>
                                 <constraint firstItem="VQF-xA-wca" firstAttribute="width" secondItem="Oax-mA-mEd" secondAttribute="width" constant="-80" id="1bi-lD-f66"/>
                                 <constraint firstItem="VQF-xA-wca" firstAttribute="width" secondItem="Oax-mA-mEd" secondAttribute="width" constant="-80" id="1bi-lD-f66"/>
-                                <constraint firstItem="pCj-dq-5rF" firstAttribute="top" secondItem="Vd3-c0-iYd" secondAttribute="bottom" id="2SS-dr-xRe"/>
+                                <constraint firstItem="pCj-dq-5rF" firstAttribute="top" secondItem="Vd3-c0-iYd" secondAttribute="bottom" constant="8" id="2SS-dr-xRe"/>
                                 <constraint firstItem="Vd3-c0-iYd" firstAttribute="top" secondItem="Oax-mA-mEd" secondAttribute="top" constant="10" id="6ON-9I-XV5"/>
                                 <constraint firstItem="Vd3-c0-iYd" firstAttribute="top" secondItem="Oax-mA-mEd" secondAttribute="top" constant="10" id="6ON-9I-XV5"/>
                                 <constraint firstItem="xIf-kY-gPW" firstAttribute="width" secondItem="Oax-mA-mEd" secondAttribute="width" multiplier="0.2" id="7yL-vu-0hi"/>
                                 <constraint firstItem="xIf-kY-gPW" firstAttribute="width" secondItem="Oax-mA-mEd" secondAttribute="width" multiplier="0.2" id="7yL-vu-0hi"/>
                                 <constraint firstItem="m6I-vy-k36" firstAttribute="width" secondItem="Oax-mA-mEd" secondAttribute="width" multiplier="0.7" id="G5a-55-w2d"/>
                                 <constraint firstItem="m6I-vy-k36" firstAttribute="width" secondItem="Oax-mA-mEd" secondAttribute="width" multiplier="0.7" id="G5a-55-w2d"/>
@@ -83,14 +84,14 @@
                                 <constraint firstItem="pCj-dq-5rF" firstAttribute="centerX" secondItem="Oax-mA-mEd" secondAttribute="centerX" id="LiY-tJ-HN8"/>
                                 <constraint firstItem="pCj-dq-5rF" firstAttribute="centerX" secondItem="Oax-mA-mEd" secondAttribute="centerX" id="LiY-tJ-HN8"/>
                                 <constraint firstAttribute="trailing" secondItem="Vd3-c0-iYd" secondAttribute="trailing" constant="10" id="QqW-8x-l8D"/>
                                 <constraint firstAttribute="trailing" secondItem="Vd3-c0-iYd" secondAttribute="trailing" constant="10" id="QqW-8x-l8D"/>
                                 <constraint firstAttribute="trailing" secondItem="m6I-vy-k36" secondAttribute="trailing" constant="10" id="d6m-wH-hZ4"/>
                                 <constraint firstAttribute="trailing" secondItem="m6I-vy-k36" secondAttribute="trailing" constant="10" id="d6m-wH-hZ4"/>
-                                <constraint firstItem="pCj-dq-5rF" firstAttribute="width" secondItem="Oax-mA-mEd" secondAttribute="width" constant="-30" id="ec5-Em-Hvc"/>
-                                <constraint firstItem="VQF-xA-wca" firstAttribute="leading" secondItem="Oax-mA-mEd" secondAttribute="leading" constant="20" id="fKa-XB-zgY"/>
+                                <constraint firstItem="pCj-dq-5rF" firstAttribute="width" secondItem="Oax-mA-mEd" secondAttribute="width" constant="-20" id="ec5-Em-Hvc"/>
+                                <constraint firstItem="VQF-xA-wca" firstAttribute="leading" secondItem="Oax-mA-mEd" secondAttribute="leading" constant="10" id="fKa-XB-zgY"/>
                                 <constraint firstAttribute="trailing" secondItem="U3K-kD-4pK" secondAttribute="trailing" constant="20" id="fib-sq-y5t"/>
                                 <constraint firstAttribute="trailing" secondItem="U3K-kD-4pK" secondAttribute="trailing" constant="20" id="fib-sq-y5t"/>
                                 <constraint firstItem="U3K-kD-4pK" firstAttribute="centerY" secondItem="VQF-xA-wca" secondAttribute="centerY" id="fxM-45-fab"/>
                                 <constraint firstItem="U3K-kD-4pK" firstAttribute="centerY" secondItem="VQF-xA-wca" secondAttribute="centerY" id="fxM-45-fab"/>
                                 <constraint firstItem="m6I-vy-k36" firstAttribute="top" secondItem="pCj-dq-5rF" secondAttribute="bottom" id="jKd-mD-fFn"/>
                                 <constraint firstItem="m6I-vy-k36" firstAttribute="top" secondItem="pCj-dq-5rF" secondAttribute="bottom" id="jKd-mD-fFn"/>
-                                <constraint firstAttribute="bottom" secondItem="VQF-xA-wca" secondAttribute="bottom" id="rUq-Gl-Ma0"/>
+                                <constraint firstAttribute="bottom" secondItem="VQF-xA-wca" secondAttribute="bottom" constant="5" id="rUq-Gl-Ma0"/>
                                 <constraint firstItem="xIf-kY-gPW" firstAttribute="leading" secondItem="Oax-mA-mEd" secondAttribute="leading" constant="10" id="xRs-gP-CBO"/>
                                 <constraint firstItem="xIf-kY-gPW" firstAttribute="leading" secondItem="Oax-mA-mEd" secondAttribute="leading" constant="10" id="xRs-gP-CBO"/>
-                                <constraint firstItem="xIf-kY-gPW" firstAttribute="top" secondItem="pCj-dq-5rF" secondAttribute="bottom" id="xYq-wH-6dd"/>
+                                <constraint firstItem="xIf-kY-gPW" firstAttribute="top" secondItem="pCj-dq-5rF" secondAttribute="bottom" constant="8" id="xYq-wH-6dd"/>
                             </constraints>
                             </constraints>
                             <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                             <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                             <userDefinedRuntimeAttributes>
                             <userDefinedRuntimeAttributes>
@@ -111,7 +112,7 @@
                         <constraint firstItem="Oax-mA-mEd" firstAttribute="bottom" secondItem="LXM-17-fy1" secondAttribute="bottom" constant="10" id="cGe-u0-Et9"/>
                         <constraint firstItem="Oax-mA-mEd" firstAttribute="bottom" secondItem="LXM-17-fy1" secondAttribute="bottom" constant="10" id="cGe-u0-Et9"/>
                         <constraint firstAttribute="top" secondItem="Oax-mA-mEd" secondAttribute="top" constant="-10" id="dfL-CJ-4Ja"/>
                         <constraint firstAttribute="top" secondItem="Oax-mA-mEd" secondAttribute="top" constant="-10" id="dfL-CJ-4Ja"/>
                         <constraint firstAttribute="trailing" secondItem="Oax-mA-mEd" secondAttribute="trailing" constant="10" id="mgX-om-hx4"/>
                         <constraint firstAttribute="trailing" secondItem="Oax-mA-mEd" secondAttribute="trailing" constant="10" id="mgX-om-hx4"/>
-                        <constraint firstAttribute="height" constant="140" id="pnJ-Mv-tz4"/>
+                        <constraint firstAttribute="height" constant="170" id="pnJ-Mv-tz4"/>
                     </constraints>
                     </constraints>
                     <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                     <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                     <userDefinedRuntimeAttributes>
                     <userDefinedRuntimeAttributes>

+ 1 - 1
app/RowGallery.swift

@@ -55,7 +55,7 @@ Extension of UIView to be formatted as sections.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first
+		nib.instantiate(withOwner: self, options: nil)
 	}
 	}
 	
 	
 	
 	

+ 1 - 1
app/RowHomeGallery.swift

@@ -52,7 +52,7 @@ Extension of UIView to be formatted as sections.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first as! UIView
+		nib.instantiate(withOwner: self, options: nil)
 	}
 	}
 	
 	
 	
 	

+ 1 - 1
app/RowHomePastActivities.swift

@@ -51,7 +51,7 @@ Extension of UIView to be formatted as past activity rows.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first
+		nib.instantiate(withOwner: self, options: nil)
 	}
 	}
 	
 	
 	
 	

+ 1 - 1
app/RowHomeSocial.swift

@@ -56,7 +56,7 @@ Extension of UIView to be formatted as sections.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first
+		nib.instantiate(withOwner: self, options: nil)
 	}
 	}
 	
 	
 	/**
 	/**

+ 168 - 0
app/RowItinerary.swift

@@ -0,0 +1,168 @@
+// 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 an activity itinerary.
+*/
+@IBDesignable class RowItinerary: UIView {
+
+	
+	// Outlets
+	@IBOutlet weak var container: UIView!
+	@IBOutlet weak var lbTime: UILabel!
+	@IBOutlet weak var lbTitle: UILabel!
+	@IBOutlet weak var lbText: UILabel!
+	@IBOutlet weak var lbLocation: UILabel!
+	
+	var id: Int = -1
+	
+	/**
+	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)
+	}
+	
+	
+	/**
+	Default constructor.
+	:param: s Custom identifier
+	:param: i Custom identifier
+	*/
+	init(s: String, i: Int) {
+		super.init(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
+		loadViewFromNib()
+		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 for the interface builder
+	*/
+	override init(frame: CGRect){
+		super.init(frame: frame)
+	}
+	
+	
+	/**
+	Sets the time of the event.
+	:param: str String with the time to set.
+	*/
+	func setStart(str: String){
+		self.lbTime.text = str
+	}
+	
+	
+	/**
+	Sets the time of the event.
+	:param: hours Hour of the event start.
+	:param: minutes Minutes of the event start.
+	*/
+	func setStart(hours: Int, minutes: Int){
+		var strMinutes: String = ""
+		if "\(minutes)".length == 1{
+			strMinutes = "0\(minutes)"
+		}
+		else{
+			strMinutes = "\(minutes)"
+		}
+		self.lbTime.text = "\(hours):\(strMinutes)"
+	}
+	
+	
+	/**
+	Sets the time of the event.
+	:param: dtime Datetime of the event start.
+	*/
+	func setStart(time: NSDate){
+		let calendar = Calendar.current
+		let hours = calendar.component(.hour, from: time as Date)
+		let minutes = calendar.component(.minute, from: time as Date)
+		var strMinutes: String = ""
+		if "\(minutes)".length == 1{
+			strMinutes = "0\(minutes)"
+		}
+		else{
+			strMinutes = "\(minutes)"
+		}
+		self.lbTime.text = "\(hours):\(strMinutes)"
+	}
+	
+	
+	/**
+	Sets the title of the event.
+	:param: text The title of the event.
+	*/
+	func setTitle(text: String){
+		self.lbTitle.text = text.decode().stripHtml()
+	}
+	
+	
+	/**
+	Sets the location of the event.
+	:param: text The location of the event.
+	*/
+	func setLocation(text: String){
+		self.lbLocation.text = text.decode().stripHtml()
+	}
+	
+	
+	/**
+	Sets the description of the event. Decodes HTML.
+	:param: text The new text.
+	*/
+	func setText(text: String){
+		self.lbText.text = text.decode().stripHtml()
+	}
+	
+	func setPlace(place: String, address: String){
+		self.lbLocation.text = place.decode().stripHtml()
+	}
+	
+	
+	/**
+	Opens an event dialog.
+	*/
+	func openItinerary(_ sender:UITapGestureRecognizer? = nil){
+		// TODO implement openItinerary.
+		NSLog(":ROWITINERARY:DEBUG: Open Itinerary")
+	}
+}

+ 139 - 0
app/RowItinerary.xib

@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" 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="12088"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="Rowitinerary" customModule="app" customModuleProvider="target">
+            <connections>
+                <outlet property="container" destination="EhP-FW-f8V" id="t03-Fa-qsA"/>
+                <outlet property="lbLocation" destination="uRl-ey-EbX" id="lHa-cl-mdu"/>
+                <outlet property="lbText" destination="qBt-Fr-7yc" id="uYt-t9-bvT"/>
+                <outlet property="lbTime" destination="9A7-eH-but" id="Ekg-l7-hwE"/>
+                <outlet property="lbTitle" destination="olV-oe-BVn" id="aXe-tE-yTK"/>
+            </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>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EhP-FW-f8V" userLabel="Container">
+                    <rect key="frame" x="0.5" y="273.5" width="375" height="120"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1UU-eM-8rG" userLabel="Entry">
+                            <rect key="frame" x="0.0" y="0.0" width="375" height="120"/>
+                            <subviews>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9A7-eH-but" userLabel="Time">
+                                    <rect key="frame" x="10" y="10" width="55" height="22"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="55" id="cfM-Es-4BC"/>
+                                    </constraints>
+                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+                                    <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                                <imageView userInteractionEnabled="NO" alpha="0.75" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="04F-rE-gcn" userLabel="Line">
+                                    <rect key="frame" x="76" y="-0.5" width="2" height="120"/>
+                                    <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="2" id="W5y-7c-FbE"/>
+                                    </constraints>
+                                </imageView>
+                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ScheduleBullet" translatesAutoresizingMaskIntoConstraints="NO" id="Pne-3z-V34" userLabel="Bullet">
+                                    <rect key="frame" x="67" y="11" width="20" height="20"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="20" id="2pe-00-Pl0"/>
+                                        <constraint firstAttribute="height" constant="20" id="uvd-36-GaV"/>
+                                    </constraints>
+                                </imageView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="olV-oe-BVn" userLabel="Title">
+                                    <rect key="frame" x="92" y="10" width="283" height="22"/>
+                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+                                    <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Text" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qBt-Fr-7yc" userLabel="Text">
+                                    <rect key="frame" x="102" y="37" width="263" height="21"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                    <nil key="textColor"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Pinpoint" translatesAutoresizingMaskIntoConstraints="NO" id="Oyf-6H-nyi" userLabel="Pinpoint">
+                                    <rect key="frame" x="107" y="68" width="10" height="13"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="10" id="2XO-EO-huO"/>
+                                        <constraint firstAttribute="height" constant="13" id="SmO-lI-jeP"/>
+                                    </constraints>
+                                </imageView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Location" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uRl-ey-EbX">
+                                    <rect key="frame" x="122" y="66.5" width="243" height="17"/>
+                                    <fontDescription key="fontDescription" type="italicSystem" pointSize="14"/>
+                                    <color key="textColor" red="0.32931472080000002" green="0.32931472080000002" blue="0.32931472080000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstItem="Pne-3z-V34" firstAttribute="centerY" secondItem="9A7-eH-but" secondAttribute="centerY" id="1dN-8O-oB5"/>
+                                <constraint firstItem="uRl-ey-EbX" firstAttribute="trailing" secondItem="qBt-Fr-7yc" secondAttribute="trailing" id="6Oo-nZ-4s3"/>
+                                <constraint firstItem="Oyf-6H-nyi" firstAttribute="top" secondItem="qBt-Fr-7yc" secondAttribute="bottom" constant="10" id="A2q-yN-Iyq"/>
+                                <constraint firstItem="uRl-ey-EbX" firstAttribute="leading" secondItem="Oyf-6H-nyi" secondAttribute="trailing" constant="5" id="Bc8-R8-h8w"/>
+                                <constraint firstItem="9A7-eH-but" firstAttribute="leading" secondItem="1UU-eM-8rG" secondAttribute="leading" constant="10" id="Cs3-Oz-o5l"/>
+                                <constraint firstItem="qBt-Fr-7yc" firstAttribute="top" secondItem="olV-oe-BVn" secondAttribute="bottom" constant="5" id="DB6-Jb-AGq"/>
+                                <constraint firstItem="olV-oe-BVn" firstAttribute="leading" secondItem="Pne-3z-V34" secondAttribute="trailing" constant="5" id="JVf-b7-HDS"/>
+                                <constraint firstItem="qBt-Fr-7yc" firstAttribute="width" secondItem="olV-oe-BVn" secondAttribute="width" constant="-20" id="Nsn-Ui-8Ps"/>
+                                <constraint firstAttribute="trailing" secondItem="olV-oe-BVn" secondAttribute="trailing" id="Stw-8D-5t9"/>
+                                <constraint firstItem="uRl-ey-EbX" firstAttribute="centerY" secondItem="Oyf-6H-nyi" secondAttribute="centerY" id="TGQ-2i-XtB"/>
+                                <constraint firstItem="Oyf-6H-nyi" firstAttribute="leading" secondItem="qBt-Fr-7yc" secondAttribute="leading" constant="5" id="ZF0-zr-8EU"/>
+                                <constraint firstItem="04F-rE-gcn" firstAttribute="centerX" secondItem="Pne-3z-V34" secondAttribute="centerX" id="i3w-iX-ZQX"/>
+                                <constraint firstItem="Pne-3z-V34" firstAttribute="leading" secondItem="9A7-eH-but" secondAttribute="trailing" constant="2" id="iJ7-Ke-nqO"/>
+                                <constraint firstItem="9A7-eH-but" firstAttribute="top" secondItem="1UU-eM-8rG" secondAttribute="top" constant="10" id="joe-bR-4kc"/>
+                                <constraint firstItem="qBt-Fr-7yc" firstAttribute="centerX" secondItem="olV-oe-BVn" secondAttribute="centerX" id="phh-bC-fo7"/>
+                                <constraint firstItem="04F-rE-gcn" firstAttribute="top" secondItem="1UU-eM-8rG" secondAttribute="top" id="yPF-Ef-pJl"/>
+                                <constraint firstItem="olV-oe-BVn" firstAttribute="centerY" secondItem="9A7-eH-but" secondAttribute="centerY" id="zRU-yr-HSW"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                    <real key="value" value="0.0"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="0.0"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </view>
+                    </subviews>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="120" id="S1t-ne-rLH"/>
+                        <constraint firstItem="1UU-eM-8rG" firstAttribute="leading" secondItem="EhP-FW-f8V" secondAttribute="leading" id="Sj6-i1-pJV"/>
+                        <constraint firstItem="04F-rE-gcn" firstAttribute="height" secondItem="EhP-FW-f8V" secondAttribute="height" id="cb8-Lg-GQP"/>
+                        <constraint firstItem="1UU-eM-8rG" firstAttribute="bottom" secondItem="EhP-FW-f8V" secondAttribute="bottom" id="iTi-VX-QEp"/>
+                        <constraint firstAttribute="trailing" secondItem="1UU-eM-8rG" secondAttribute="trailing" id="xDv-a5-7wM"/>
+                        <constraint firstAttribute="top" secondItem="1UU-eM-8rG" secondAttribute="top" id="y1f-q3-Um8"/>
+                    </constraints>
+                    <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                            <real key="value" value="0.0"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="EhP-FW-f8V" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="444-cT-i3J"/>
+                <constraint firstItem="EhP-FW-f8V" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="H8x-AV-wUI"/>
+                <constraint firstItem="EhP-FW-f8V" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="wxV-2s-Ojx"/>
+            </constraints>
+        </view>
+    </objects>
+    <resources>
+        <image name="Pinpoint" width="10" height="13"/>
+        <image name="ScheduleBullet" width="12" height="12"/>
+    </resources>
+</document>

+ 1 - 1
app/RowLabel.swift

@@ -46,7 +46,7 @@ Extension of UIView to be formatted as sections.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first
+		nib.instantiate(withOwner: self, options: nil)
 	}
 	}
 	
 	
 	
 	

+ 1 - 1
app/RowLablancaDay.swift

@@ -49,7 +49,7 @@ Extension of UIView to be formatted as sections.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first
+		nib.instantiate(withOwner: self, options: nil)
 		
 		
 		self.frame = self.bounds
 		self.frame = self.bounds
 		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
 		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]

+ 1 - 1
app/RowLablancaOffer.swift

@@ -48,7 +48,7 @@ Extension of UIView to be formatted as sections.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first
+		nib.instantiate(withOwner: self, options: nil)
 		
 		
 		self.frame = self.bounds
 		self.frame = self.bounds
 		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
 		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]

+ 1 - 1
app/RowSchedule.swift

@@ -49,7 +49,7 @@ Extension of UIView to be formatted as sections.
 	private func loadViewFromNib() {
 	private func loadViewFromNib() {
 		let bundle = Bundle(for: type(of: self))
 		let bundle = Bundle(for: type(of: self))
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
 		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
-		nib.instantiate(withOwner: self, options: nil).first
+		nib.instantiate(withOwner: self, options: nil)
 	}
 	}
 	
 	
 	
 	

+ 2 - 2
app/ScheduleViewController.swift

@@ -259,7 +259,7 @@ class ScheduleViewController: UIViewController, UIGestureRecognizerDelegate {
 			for r in searchResults! {
 			for r in searchResults! {
 				
 				
 				title = r.value(forKey: "title_\(lang!)") as! String
 				title = r.value(forKey: "title_\(lang!)") as! String
-				if let tx = r.value(forKey: "description_\(lang!)"){
+				if r.value(forKey: "description_\(lang!)") != nil{
 					text = r.value(forKey: "description_\(lang!)") as! String
 					text = r.value(forKey: "description_\(lang!)") as! String
 				}
 				}
 				else{
 				else{
@@ -279,7 +279,7 @@ class ScheduleViewController: UIViewController, UIGestureRecognizerDelegate {
 				locationFetchRequest.fetchLimit = 1
 				locationFetchRequest.fetchLimit = 1
 				do{
 				do{
 					var locationSearchResults = try self.context?.fetch(locationFetchRequest)
 					var locationSearchResults = try self.context?.fetch(locationFetchRequest)
-					var locationR = locationSearchResults?[0]
+					let locationR = locationSearchResults?[0]
 					location = locationR?.value(forKey: "name_\(lang!)")! as! String
 					location = locationR?.value(forKey: "name_\(lang!)")! as! String
 					
 					
 					row.setLocation(text: location)
 					row.setLocation(text: location)

+ 1 - 2
app/Sync.swift

@@ -1820,9 +1820,8 @@ class Sync{
 			dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
 			dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
 			dateFormatter.calendar = NSCalendar(calendarIdentifier: NSCalendar.Identifier.ISO8601)! as Calendar
 			dateFormatter.calendar = NSCalendar(calendarIdentifier: NSCalendar.Identifier.ISO8601)! as Calendar
 			dateFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") as Locale!
 			dateFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") as Locale!
-			//dateFormatter.timeZone = NSTimeZone(forSecondsFromGMT: 0) as TimeZone!
 			dateFormatter.timeZone = NSTimeZone.local
 			dateFormatter.timeZone = NSTimeZone.local
-			var dayString = "\(str.subStr(start : str.indexOf(target : "\"start\":")! + 9, end : str.indexOf(target : ",\"")! - 11)) 00:00:00"
+			let dayString = "\(str.subStr(start : str.indexOf(target : "\"start\":")! + 9, end : str.indexOf(target : ",\"")! - 11)) 00:00:00"
 			var day = dateFormatter.date(from: dayString)!
 			var day = dateFormatter.date(from: dayString)!
 			// If on the first hours of the next day...
 			// If on the first hours of the next day...
 			let calendar = Calendar.current
 			let calendar = Calendar.current

+ 2 - 6
app/UIImageView.swift

@@ -79,14 +79,10 @@ extension UIImageView {
 			let task = session.downloadTask(with: request) { (tempLocalUrl, response, error) in
 			let task = session.downloadTask(with: request) { (tempLocalUrl, response, error) in
 				if let tempLocalUrl = tempLocalUrl, error == nil {
 				if let tempLocalUrl = tempLocalUrl, error == nil {
 					
 					
-					// Success
-					if let statusCode = (response as? HTTPURLResponse)?.statusCode {
-						// TODO something.
-					}
-					
 					do {
 					do {
 						try FileManager.default.copyItem(at: tempLocalUrl, to: destinationFileUrl)
 						try FileManager.default.copyItem(at: tempLocalUrl, to: destinationFileUrl)
-					} catch (let writeError) {
+					}
+					catch (let writeError) {
 						NSLog(":IMAGE:ERROR: Error creating a file \(destinationFileUrl) : \(writeError)")
 						NSLog(":IMAGE:ERROR: Error creating a file \(destinationFileUrl) : \(writeError)")
 					}
 					}
 					
 					

+ 0 - 1
app/UIView.swift

@@ -63,7 +63,6 @@ import UIKit
 	
 	
 	var parentViewController: ViewController? {
 	var parentViewController: ViewController? {
 		var parentResponder: UIResponder? = self
 		var parentResponder: UIResponder? = self
-		var i = 0
 		while parentResponder != nil {
 		while parentResponder != nil {
 			parentResponder = parentResponder!.next
 			parentResponder = parentResponder!.next
 			if let viewController = parentResponder as? ViewController {
 			if let viewController = parentResponder as? ViewController {

+ 4 - 11
app/ViewController.swift

@@ -106,9 +106,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	*/
 	*/
 	func showFutureActivity(id: Int){
 	func showFutureActivity(id: Int){
 		self.passId = id
 		self.passId = id
-		// TODO set future segue
-		//performSegue(withIdentifier: "SegueFutureActivity", sender: nil)
-		performSegue(withIdentifier: "SeguePastActivity", sender: nil)
+		performSegue(withIdentifier: "SegueFutureActivity", sender: nil)
 	}
 	}
 	
 	
 	
 	
@@ -159,6 +157,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 			Sync(synchronous: true)
 			Sync(synchronous: true)
 		}
 		}
 		else{
 		else{
+			// TODO CHECK this
 			NSLog(":CONTROLLER:DEBUG: Re-populating disabled: Throws error.")
 			NSLog(":CONTROLLER:DEBUG: Re-populating disabled: Throws error.")
 			//self.populate()
 			//self.populate()
 			syncSegue?.destination.dismiss(animated: true, completion: nil)
 			syncSegue?.destination.dismiss(animated: true, completion: nil)
@@ -197,8 +196,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 			(segue.destination as! PastActivityViewController).id = passId
 			(segue.destination as! PastActivityViewController).id = passId
 		}
 		}
 		if segue.identifier == "SegueFutureActivity"{
 		if segue.identifier == "SegueFutureActivity"{
-			// TODO
-			//(segue.destination as! FutureActivityViewController).id = passId
+			(segue.destination as! FutureActivityViewController).id = passId
 		}
 		}
 	}
 	}
 	
 	
@@ -332,8 +330,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	//Make a cell for each section
 	//Make a cell for each section
 	func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
 	func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
 		
 		
-		var first = true
-		
 		//Get a reference to our storyboard cell
 		//Get a reference to our storyboard cell
 		let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath as IndexPath) as! MenuCollectionViewCell
 		let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath as IndexPath) as! MenuCollectionViewCell
 		
 		
@@ -343,7 +339,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 		// Mark the first one as selected.
 		// Mark the first one as selected.
 		if indexPath.item == 0{
 		if indexPath.item == 0{
 			cell.isSelected = true
 			cell.isSelected = true
-			first = false
 		}
 		}
 		
 		
 		return cell
 		return cell
@@ -361,9 +356,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	:param: selected Index of the selected item.
 	:param: selected Index of the selected item.
 	*/
 	*/
 	@IBAction func showComponent(selected: Int) {
 	@IBAction func showComponent(selected: Int) {
-		//Activate label
-		var i = 0
-		
+				
 		//Show the view
 		//Show the view
 		if selected == 0 {
 		if selected == 0 {
 			UIView.animate(withDuration: 0.5, animations: {
 			UIView.animate(withDuration: 0.5, animations: {