Просмотр исходного кода

Merge branch 'BaseProject' into Sync

Iñigo Valentin 9 лет назад
Родитель
Сommit
0945c20b63
26 измененных файлов с 890 добавлено и 11 удалено
  1. 12 0
      app.xcodeproj/project.pbxproj
  2. 6 0
      app/Assets.xcassets/Misc/Contents.json
  3. 23 0
      app/Assets.xcassets/Misc/Pinpoint.imageset/Contents.json
  4. BIN
      app/Assets.xcassets/Misc/Pinpoint.imageset/pinpoint-1.png
  5. BIN
      app/Assets.xcassets/Misc/Pinpoint.imageset/pinpoint-2.png
  6. BIN
      app/Assets.xcassets/Misc/Pinpoint.imageset/pinpoint.png
  7. 23 0
      app/Assets.xcassets/Misc/PinpointGM.imageset/Contents.json
  8. BIN
      app/Assets.xcassets/Misc/PinpointGM.imageset/pinpoint_gm-1.png
  9. BIN
      app/Assets.xcassets/Misc/PinpointGM.imageset/pinpoint_gm-2.png
  10. BIN
      app/Assets.xcassets/Misc/PinpointGM.imageset/pinpoint_gm.png
  11. 23 0
      app/Assets.xcassets/Misc/ScheduleBullet.imageset/Contents.json
  12. BIN
      app/Assets.xcassets/Misc/ScheduleBullet.imageset/schedule_point-1.png
  13. BIN
      app/Assets.xcassets/Misc/ScheduleBullet.imageset/schedule_point-2.png
  14. BIN
      app/Assets.xcassets/Misc/ScheduleBullet.imageset/schedule_point.png
  15. 23 0
      app/Assets.xcassets/Misc/ScheduleLine.imageset/Contents.json
  16. BIN
      app/Assets.xcassets/Misc/ScheduleLine.imageset/schedule_timeline-1.png
  17. BIN
      app/Assets.xcassets/Misc/ScheduleLine.imageset/schedule_timeline-2.png
  18. BIN
      app/Assets.xcassets/Misc/ScheduleLine.imageset/schedule_timeline.png
  19. 271 7
      app/Base.lproj/Main.storyboard
  20. 13 0
      app/LablancaView.swift
  21. 1 1
      app/LablancaView.xib
  22. 141 0
      app/RowSchedule.swift
  23. 143 0
      app/RowSchedule.xib
  24. 185 0
      app/ScheduleViewController.swift
  25. 6 3
      app/Sync.swift
  26. 20 0
      app/ViewController.swift

+ 12 - 0
app.xcodeproj/project.pbxproj

@@ -53,6 +53,9 @@
 		93D9EA6C1DE3498500089002 /* HomeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93D9EA6B1DE3498500089002 /* HomeView.xib */; };
 		93D9EA6C1DE3498500089002 /* HomeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93D9EA6B1DE3498500089002 /* HomeView.xib */; };
 		93D9EA711DE37C7900089002 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 93D9EA701DE37C7900089002 /* libsqlite3.tbd */; };
 		93D9EA711DE37C7900089002 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 93D9EA701DE37C7900089002 /* libsqlite3.tbd */; };
 		93D9EA761DE3ACBB00089002 /* Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA751DE3ACBB00089002 /* Sync.swift */; };
 		93D9EA761DE3ACBB00089002 /* Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA751DE3ACBB00089002 /* Sync.swift */; };
+		93E0C5F41EBE306900905811 /* ScheduleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93E0C5F31EBE306900905811 /* ScheduleViewController.swift */; };
+		93EB2F0C1EBF5AEB00F64186 /* RowSchedule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93EB2F0B1EBF5AEB00F64186 /* RowSchedule.swift */; };
+		93EB2F0E1EBF5BF500F64186 /* RowSchedule.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93EB2F0D1EBF5BF500F64186 /* RowSchedule.xib */; };
 /* End PBXBuildFile section */
 /* End PBXBuildFile section */
 
 
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
@@ -104,6 +107,9 @@
 		93D9EA6B1DE3498500089002 /* HomeView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeView.xib; sourceTree = "<group>"; };
 		93D9EA6B1DE3498500089002 /* HomeView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeView.xib; sourceTree = "<group>"; };
 		93D9EA701DE37C7900089002 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
 		93D9EA701DE37C7900089002 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
 		93D9EA751DE3ACBB00089002 /* Sync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sync.swift; sourceTree = "<group>"; };
 		93D9EA751DE3ACBB00089002 /* Sync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sync.swift; sourceTree = "<group>"; };
+		93E0C5F31EBE306900905811 /* ScheduleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScheduleViewController.swift; sourceTree = "<group>"; };
+		93EB2F0B1EBF5AEB00F64186 /* RowSchedule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowSchedule.swift; sourceTree = "<group>"; };
+		93EB2F0D1EBF5BF500F64186 /* RowSchedule.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowSchedule.xib; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 /* End PBXFileReference section */
 
 
 /* Begin PBXFrameworksBuildPhase section */
 /* Begin PBXFrameworksBuildPhase section */
@@ -184,6 +190,9 @@
 				938D211E1EA2306300C47EC3 /* LablancaView.swift */,
 				938D211E1EA2306300C47EC3 /* LablancaView.swift */,
 				9326C4F31EA51C39007DF2A4 /* RowLablancaDay.xib */,
 				9326C4F31EA51C39007DF2A4 /* RowLablancaDay.xib */,
 				9326C4F51EA5279D007DF2A4 /* RowLablancaDay.swift */,
 				9326C4F51EA5279D007DF2A4 /* RowLablancaDay.swift */,
+				93E0C5F31EBE306900905811 /* ScheduleViewController.swift */,
+				93EB2F0B1EBF5AEB00F64186 /* RowSchedule.swift */,
+				93EB2F0D1EBF5BF500F64186 /* RowSchedule.xib */,
 			);
 			);
 			path = app;
 			path = app;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
@@ -269,6 +278,7 @@
 				93075C6A1E59CAB000396389 /* BlogView.xib in Resources */,
 				93075C6A1E59CAB000396389 /* BlogView.xib in Resources */,
 				93B84BA41D9C31AB006C0F67 /* Assets.xcassets in Resources */,
 				93B84BA41D9C31AB006C0F67 /* Assets.xcassets in Resources */,
 				935D6E2D1E8678B700CED3A1 /* GalleryView.xib in Resources */,
 				935D6E2D1E8678B700CED3A1 /* GalleryView.xib in Resources */,
+				93EB2F0E1EBF5BF500F64186 /* RowSchedule.xib in Resources */,
 				93BAD2EE1E585578009DF853 /* RowHomeBlog.xib in Resources */,
 				93BAD2EE1E585578009DF853 /* RowHomeBlog.xib in Resources */,
 				9326C4F41EA51C39007DF2A4 /* RowLablancaDay.xib in Resources */,
 				9326C4F41EA51C39007DF2A4 /* RowLablancaDay.xib in Resources */,
 				935D6E311E867C5E00CED3A1 /* RowGallery.xib in Resources */,
 				935D6E311E867C5E00CED3A1 /* RowGallery.xib in Resources */,
@@ -287,6 +297,7 @@
 			files = (
 			files = (
 				93294FF81E336FA000FDAF50 /* Entry.swift in Sources */,
 				93294FF81E336FA000FDAF50 /* Entry.swift in Sources */,
 				937EA02D1E5B8B5300D0893A /* UIApplcation.swift in Sources */,
 				937EA02D1E5B8B5300D0893A /* UIApplcation.swift in Sources */,
+				93E0C5F41EBE306900905811 /* ScheduleViewController.swift in Sources */,
 				936966F11E984B5000A11055 /* RowAlbum.swift in Sources */,
 				936966F11E984B5000A11055 /* RowAlbum.swift in Sources */,
 				93D9EA641DE273FD00089002 /* Section.swift in Sources */,
 				93D9EA641DE273FD00089002 /* Section.swift in Sources */,
 				93D9EA6A1DE3491100089002 /* HomeView.swift in Sources */,
 				93D9EA6A1DE3491100089002 /* HomeView.swift in Sources */,
@@ -305,6 +316,7 @@
 				93B84B9A1D9C31AB006C0F67 /* AppDelegate.swift in Sources */,
 				93B84B9A1D9C31AB006C0F67 /* AppDelegate.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 */,
 				936966ED1E98445200A11055 /* AlbumViewController.swift in Sources */,
 				936966ED1E98445200A11055 /* AlbumViewController.swift in Sources */,
 				93D9EA681DE342AC00089002 /* UIView.swift in Sources */,
 				93D9EA681DE342AC00089002 /* UIView.swift in Sources */,
 				938D211F1EA2306300C47EC3 /* LablancaView.swift in Sources */,
 				938D211F1EA2306300C47EC3 /* LablancaView.swift in Sources */,

+ 6 - 0
app/Assets.xcassets/Misc/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 23 - 0
app/Assets.xcassets/Misc/Pinpoint.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "pinpoint.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "pinpoint-1.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "pinpoint-2.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
app/Assets.xcassets/Misc/Pinpoint.imageset/pinpoint-1.png


BIN
app/Assets.xcassets/Misc/Pinpoint.imageset/pinpoint-2.png


BIN
app/Assets.xcassets/Misc/Pinpoint.imageset/pinpoint.png


+ 23 - 0
app/Assets.xcassets/Misc/PinpointGM.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "pinpoint_gm.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "pinpoint_gm-1.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "pinpoint_gm-2.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
app/Assets.xcassets/Misc/PinpointGM.imageset/pinpoint_gm-1.png


BIN
app/Assets.xcassets/Misc/PinpointGM.imageset/pinpoint_gm-2.png


BIN
app/Assets.xcassets/Misc/PinpointGM.imageset/pinpoint_gm.png


+ 23 - 0
app/Assets.xcassets/Misc/ScheduleBullet.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "schedule_point.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "schedule_point-1.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "schedule_point-2.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
app/Assets.xcassets/Misc/ScheduleBullet.imageset/schedule_point-1.png


BIN
app/Assets.xcassets/Misc/ScheduleBullet.imageset/schedule_point-2.png


BIN
app/Assets.xcassets/Misc/ScheduleBullet.imageset/schedule_point.png


+ 23 - 0
app/Assets.xcassets/Misc/ScheduleLine.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "schedule_timeline.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "schedule_timeline-1.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "schedule_timeline-2.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
app/Assets.xcassets/Misc/ScheduleLine.imageset/schedule_timeline-1.png


BIN
app/Assets.xcassets/Misc/ScheduleLine.imageset/schedule_timeline-2.png


BIN
app/Assets.xcassets/Misc/ScheduleLine.imageset/schedule_timeline.png


+ 271 - 7
app/Base.lproj/Main.storyboard

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
     <device id="retina4_0" orientation="portrait">
     <device id="retina4_0" 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="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
         <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -187,6 +187,7 @@
                         <outlet property="containerViewLocation" destination="T4H-Rn-I4y" id="EFa-Km-WuR"/>
                         <outlet property="containerViewLocation" destination="T4H-Rn-I4y" id="EFa-Km-WuR"/>
                         <segue destination="UkS-wI-Yhx" kind="show" identifier="SeguePost" id="gs2-jd-cPW"/>
                         <segue destination="UkS-wI-Yhx" kind="show" identifier="SeguePost" id="gs2-jd-cPW"/>
                         <segue destination="k0M-Sk-DZM" kind="show" identifier="SegueAlbum" id="Puc-tv-vaD"/>
                         <segue destination="k0M-Sk-DZM" kind="show" identifier="SegueAlbum" id="Puc-tv-vaD"/>
+                        <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"/>
                     </connections>
                     </connections>
                 </viewController>
                 </viewController>
@@ -485,7 +486,7 @@
                                 </userDefinedRuntimeAttributes>
                                 </userDefinedRuntimeAttributes>
                             </view>
                             </view>
                         </subviews>
                         </subviews>
-                        <color key="backgroundColor" red="0.70980392160000005" green="0.82745098039999998" blue="0.8980392157" 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="jx5-wy-ab4" firstAttribute="centerX" secondItem="mCJ-K1-jG1" secondAttribute="centerX" id="5lE-sn-JIj"/>
                             <constraint firstItem="jx5-wy-ab4" firstAttribute="centerX" secondItem="mCJ-K1-jG1" secondAttribute="centerX" id="5lE-sn-JIj"/>
                             <constraint firstItem="arX-Be-0iS" firstAttribute="top" secondItem="yy6-d2-MRo" secondAttribute="bottom" id="SYd-o2-Nm3"/>
                             <constraint firstItem="arX-Be-0iS" firstAttribute="top" secondItem="yy6-d2-MRo" secondAttribute="bottom" id="SYd-o2-Nm3"/>
@@ -560,7 +561,7 @@
                                     <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" bounces="NO" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kmd-tW-XIB">
                                     <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" bounces="NO" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kmd-tW-XIB">
                                         <rect key="frame" x="0.0" y="0.0" width="320" height="518"/>
                                         <rect key="frame" x="0.0" y="0.0" width="320" height="518"/>
                                         <subviews>
                                         <subviews>
-                                            <view contentMode="scaleToFill" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sej-1q-hlq" userLabel="Section">
+                                            <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sej-1q-hlq" userLabel="Section">
                                                 <rect key="frame" x="10" y="10" width="300" height="1046"/>
                                                 <rect key="frame" x="10" y="10" width="300" height="1046"/>
                                                 <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="YsV-il-CeR" userLabel="Title">
                                                     <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="YsV-il-CeR" userLabel="Title">
@@ -573,13 +574,13 @@
                                                         <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                                         <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                                         <nil key="highlightedColor"/>
                                                         <nil key="highlightedColor"/>
                                                     </label>
                                                     </label>
-                                                    <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="NlX-b5-vyb" userLabel="Content">
+                                                    <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="NlX-b5-vyb" userLabel="Content">
                                                         <rect key="frame" x="0.0" y="30" width="300" height="1016"/>
                                                         <rect key="frame" x="0.0" y="30" width="300" height="1016"/>
                                                         <subviews>
                                                         <subviews>
                                                             <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YEF-04-q7Y" userLabel="Album">
                                                             <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YEF-04-q7Y" userLabel="Album">
                                                                 <rect key="frame" x="8" y="8" width="284" height="1000"/>
                                                                 <rect key="frame" x="8" y="8" width="284" height="1000"/>
                                                                 <subviews>
                                                                 <subviews>
-                                                                    <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="WRD-IZ-JpU">
+                                                                    <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="WRD-IZ-JpU">
                                                                         <rect key="frame" x="0.0" y="0.0" width="284" height="1000"/>
                                                                         <rect key="frame" x="0.0" y="0.0" width="284" height="1000"/>
                                                                     </stackView>
                                                                     </stackView>
                                                                 </subviews>
                                                                 </subviews>
@@ -662,7 +663,7 @@
                                 </userDefinedRuntimeAttributes>
                                 </userDefinedRuntimeAttributes>
                             </view>
                             </view>
                         </subviews>
                         </subviews>
-                        <color key="backgroundColor" red="0.70980392160000005" green="0.82745098039999998" blue="0.8980392157" 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="kLX-yW-lMr" firstAttribute="top" secondItem="ONc-DJ-6Kh" secondAttribute="bottom" id="1cs-f7-eXV"/>
                             <constraint firstItem="kLX-yW-lMr" firstAttribute="top" secondItem="ONc-DJ-6Kh" secondAttribute="bottom" id="1cs-f7-eXV"/>
                             <constraint firstItem="WEW-3s-kOI" firstAttribute="centerX" secondItem="iBY-d9-Ye4" secondAttribute="centerX" id="7rG-90-CBm"/>
                             <constraint firstItem="WEW-3s-kOI" firstAttribute="centerX" secondItem="iBY-d9-Ye4" secondAttribute="centerX" id="7rG-90-CBm"/>
@@ -690,6 +691,269 @@
             </objects>
             </objects>
             <point key="canvasLocation" x="-1978" y="1477"/>
             <point key="canvasLocation" x="-1978" y="1477"/>
         </scene>
         </scene>
+        <!--Schedule-->
+        <scene sceneID="0Lj-Be-Hu6">
+            <objects>
+                <viewController title="Album" id="zJF-Mh-CNb" userLabel="Schedule" customClass="ScheduleViewController" customModule="app" customModuleProvider="target" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="dOJ-i5-gIk"/>
+                        <viewControllerLayoutGuide type="bottom" id="Kp9-sV-JUZ"/>
+                    </layoutGuides>
+                    <view key="view" autoresizesSubviews="NO" contentMode="scaleToFill" id="8YN-gM-ymv" userLabel="Container">
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P0f-Qc-GSS" userLabel="Toolbar">
+                                <rect key="frame" x="0.0" y="20" width="320" height="30"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cV9-gT-2OC">
+                                        <rect key="frame" x="0.0" y="0.0" width="48" height="30"/>
+                                        <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                        <state key="normal" title="&lt;">
+                                            <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                        </state>
+                                    </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="RJE-Hu-oDM">
+                                        <rect key="frame" x="48" y="0.0" width="224" height="30"/>
+                                        <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+                                        <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <constraints>
+                                    <constraint firstItem="RJE-Hu-oDM" firstAttribute="centerX" secondItem="P0f-Qc-GSS" secondAttribute="centerX" id="T6g-du-prz"/>
+                                    <constraint firstItem="cV9-gT-2OC" firstAttribute="leading" secondItem="P0f-Qc-GSS" secondAttribute="leading" id="VGf-cr-zKT"/>
+                                    <constraint firstItem="cV9-gT-2OC" firstAttribute="width" secondItem="P0f-Qc-GSS" secondAttribute="width" multiplier="0.15" id="WCJ-A0-CgT"/>
+                                    <constraint firstItem="RJE-Hu-oDM" firstAttribute="height" secondItem="P0f-Qc-GSS" secondAttribute="height" id="YlB-So-f8f"/>
+                                    <constraint firstItem="RJE-Hu-oDM" firstAttribute="centerY" secondItem="P0f-Qc-GSS" secondAttribute="centerY" id="aES-4b-n3l"/>
+                                    <constraint firstItem="RJE-Hu-oDM" firstAttribute="width" secondItem="P0f-Qc-GSS" secondAttribute="width" multiplier="0.7" id="fKA-UR-a5d"/>
+                                    <constraint firstItem="cV9-gT-2OC" firstAttribute="centerY" secondItem="P0f-Qc-GSS" secondAttribute="centerY" id="j0s-Q2-z7i"/>
+                                    <constraint firstItem="cV9-gT-2OC" firstAttribute="height" secondItem="P0f-Qc-GSS" secondAttribute="height" id="rCF-Un-LBK"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rRo-dr-1GN">
+                                <rect key="frame" x="0.0" y="50" width="320" height="518"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nIg-ez-N2J" userLabel="Section">
+                                        <rect key="frame" x="10" y="10" width="300" height="498"/>
+                                        <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="663-n7-Jwn" userLabel="Title">
+                                                <rect key="frame" x="0.0" y="0.0" width="300" 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="zTh-A8-uDI"/>
+                                                </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="rYw-pJ-uyq" userLabel="Content">
+                                                <rect key="frame" x="2" y="30" width="296" height="468.5"/>
+                                                <subviews>
+                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="odg-U1-6cp" userLabel="Calendar">
+                                                        <rect key="frame" x="8" y="8" width="280" height="60"/>
+                                                        <subviews>
+                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ean-uL-e8X">
+                                                                <rect key="frame" x="10" y="7" width="45" height="45"/>
+                                                                <color key="backgroundColor" red="0.070588235289999995" green="0.27058823529999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="height" constant="45" id="FCK-N3-WdV"/>
+                                                                    <constraint firstAttribute="width" constant="45" id="czB-hK-gr2"/>
+                                                                </constraints>
+                                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                                                <state key="normal" title="&lt;">
+                                                                    <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                                </state>
+                                                                <userDefinedRuntimeAttributes>
+                                                                    <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                                                        <color key="value" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                                    </userDefinedRuntimeAttribute>
+                                                                    <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                                                        <real key="value" value="2"/>
+                                                                    </userDefinedRuntimeAttribute>
+                                                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                                        <real key="value" value="4"/>
+                                                                    </userDefinedRuntimeAttribute>
+                                                                </userDefinedRuntimeAttributes>
+                                                            </button>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="25" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EUB-BM-L7c" userLabel="Number">
+                                                                <rect key="frame" x="65" y="7.5" width="45" height="45"/>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="width" constant="45" id="0J5-54-fFO"/>
+                                                                    <constraint firstAttribute="height" constant="45" id="bRL-x7-mQS"/>
+                                                                </constraints>
+                                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="35"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Agosto" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g7M-sJ-teh" userLabel="Month">
+                                                                <rect key="frame" x="110" y="32" width="105" height="20.5"/>
+                                                                <fontDescription key="fontDescription" type="italicSystem" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Margoeguna" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TH3-vv-4wy">
+                                                                <rect key="frame" x="110" y="7.5" width="115" height="20.5"/>
+                                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gEL-Ik-UfU">
+                                                                <rect key="frame" x="225" y="7" width="45" height="45"/>
+                                                                <color key="backgroundColor" red="0.070588235289999995" green="0.27058823529999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="width" constant="45" id="0Dv-S2-hPr"/>
+                                                                    <constraint firstAttribute="height" constant="45" id="GXZ-mi-hcs"/>
+                                                                </constraints>
+                                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                                                <state key="normal" title="&gt;">
+                                                                    <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                                </state>
+                                                                <userDefinedRuntimeAttributes>
+                                                                    <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                                                        <color key="value" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                                    </userDefinedRuntimeAttribute>
+                                                                    <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                                                        <real key="value" value="2"/>
+                                                                    </userDefinedRuntimeAttribute>
+                                                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                                        <real key="value" value="4"/>
+                                                                    </userDefinedRuntimeAttribute>
+                                                                </userDefinedRuntimeAttributes>
+                                                            </button>
+                                                        </subviews>
+                                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <constraints>
+                                                            <constraint firstItem="ean-uL-e8X" firstAttribute="leading" secondItem="odg-U1-6cp" secondAttribute="leading" constant="10" id="2tn-Yg-glj"/>
+                                                            <constraint firstItem="EUB-BM-L7c" firstAttribute="leading" secondItem="ean-uL-e8X" secondAttribute="trailing" constant="10" id="7wi-ei-pIo"/>
+                                                            <constraint firstItem="gEL-Ik-UfU" firstAttribute="centerY" secondItem="odg-U1-6cp" secondAttribute="centerY" id="Drw-jI-c92"/>
+                                                            <constraint firstItem="ean-uL-e8X" firstAttribute="centerY" secondItem="odg-U1-6cp" secondAttribute="centerY" id="FbR-7B-mF9"/>
+                                                            <constraint firstItem="TH3-vv-4wy" firstAttribute="trailing" secondItem="gEL-Ik-UfU" secondAttribute="leading" id="Fwr-5c-qZk"/>
+                                                            <constraint firstItem="g7M-sJ-teh" firstAttribute="leading" secondItem="EUB-BM-L7c" secondAttribute="trailing" id="SDa-kN-y0V"/>
+                                                            <constraint firstItem="g7M-sJ-teh" firstAttribute="bottom" secondItem="EUB-BM-L7c" secondAttribute="bottom" id="ewO-z9-CnW"/>
+                                                            <constraint firstItem="TH3-vv-4wy" firstAttribute="leading" secondItem="EUB-BM-L7c" secondAttribute="trailing" id="exx-HG-g1H"/>
+                                                            <constraint firstItem="TH3-vv-4wy" firstAttribute="top" secondItem="EUB-BM-L7c" secondAttribute="top" id="fjd-hL-ilJ"/>
+                                                            <constraint firstAttribute="trailing" secondItem="gEL-Ik-UfU" secondAttribute="trailing" constant="10" id="lUb-Gk-coy"/>
+                                                            <constraint firstItem="g7M-sJ-teh" firstAttribute="trailing" secondItem="gEL-Ik-UfU" secondAttribute="leading" constant="-10" id="nvO-MM-b9b"/>
+                                                            <constraint firstItem="EUB-BM-L7c" firstAttribute="centerY" secondItem="odg-U1-6cp" secondAttribute="centerY" id="yZR-5M-Qdr"/>
+                                                            <constraint firstAttribute="height" constant="60" id="yfY-8b-HUb"/>
+                                                        </constraints>
+                                                    </view>
+                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sqf-Nt-Prc" userLabel="Schedule">
+                                                        <rect key="frame" x="8" y="78" width="280" height="382.5"/>
+                                                        <subviews>
+                                                            <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="48Q-LP-YCz">
+                                                                <rect key="frame" x="0.0" y="0.0" width="280" height="382.5"/>
+                                                                <subviews>
+                                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="bHp-Km-KNL">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="280" height="382.5"/>
+                                                                    </stackView>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="bHp-Km-KNL" firstAttribute="centerY" secondItem="48Q-LP-YCz" secondAttribute="centerY" id="HB5-Fp-quo"/>
+                                                                    <constraint firstItem="bHp-Km-KNL" firstAttribute="centerX" secondItem="48Q-LP-YCz" secondAttribute="centerX" id="VAI-Nn-IAt"/>
+                                                                    <constraint firstItem="bHp-Km-KNL" firstAttribute="width" secondItem="48Q-LP-YCz" secondAttribute="width" id="aBI-FI-uS0"/>
+                                                                    <constraint firstItem="bHp-Km-KNL" firstAttribute="height" secondItem="48Q-LP-YCz" secondAttribute="height" id="pD4-YH-rJ5"/>
+                                                                </constraints>
+                                                            </scrollView>
+                                                        </subviews>
+                                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <constraints>
+                                                            <constraint firstItem="48Q-LP-YCz" firstAttribute="centerX" secondItem="Sqf-Nt-Prc" secondAttribute="centerX" id="D5K-ml-TlX"/>
+                                                            <constraint firstItem="48Q-LP-YCz" firstAttribute="height" secondItem="Sqf-Nt-Prc" secondAttribute="height" id="hRA-1N-OZH"/>
+                                                            <constraint firstItem="48Q-LP-YCz" firstAttribute="centerY" secondItem="Sqf-Nt-Prc" secondAttribute="centerY" id="tz4-U7-hYk"/>
+                                                            <constraint firstItem="48Q-LP-YCz" firstAttribute="width" secondItem="Sqf-Nt-Prc" secondAttribute="width" id="zUk-4F-sbH"/>
+                                                        </constraints>
+                                                        <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>
+                                                </subviews>
+                                                <color key="backgroundColor" red="0.59607843140000005" green="0.7843137255" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                                <constraints>
+                                                    <constraint firstItem="Sqf-Nt-Prc" firstAttribute="top" secondItem="odg-U1-6cp" secondAttribute="bottom" constant="10" id="aOG-X0-VZl"/>
+                                                </constraints>
+                                                <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
+                                            </stackView>
+                                        </subviews>
+                                        <color key="backgroundColor" red="0.59607843140000005" green="0.7843137255" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                        <constraints>
+                                            <constraint firstItem="rYw-pJ-uyq" firstAttribute="top" secondItem="663-n7-Jwn" secondAttribute="bottom" id="9Gs-ds-1Kn"/>
+                                            <constraint firstItem="663-n7-Jwn" firstAttribute="width" secondItem="nIg-ez-N2J" secondAttribute="width" id="P66-wF-f9s"/>
+                                            <constraint firstItem="663-n7-Jwn" firstAttribute="centerX" secondItem="nIg-ez-N2J" secondAttribute="centerX" id="WQ9-5d-Emo"/>
+                                            <constraint firstItem="Sqf-Nt-Prc" firstAttribute="width" secondItem="nIg-ez-N2J" secondAttribute="width" constant="-20" id="Z9f-tb-ejn"/>
+                                            <constraint firstItem="663-n7-Jwn" firstAttribute="top" secondItem="nIg-ez-N2J" secondAttribute="top" id="add-lE-oaz"/>
+                                            <constraint firstItem="Sqf-Nt-Prc" firstAttribute="centerX" secondItem="nIg-ez-N2J" secondAttribute="centerX" id="ccQ-Bg-VP2"/>
+                                            <constraint firstItem="rYw-pJ-uyq" firstAttribute="centerX" secondItem="nIg-ez-N2J" secondAttribute="centerX" id="fep-5d-H6q"/>
+                                            <constraint firstAttribute="bottom" secondItem="rYw-pJ-uyq" secondAttribute="bottom" id="uMf-AM-09X"/>
+                                        </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>
+                                <color key="backgroundColor" red="0.70980392160000005" green="0.82745098039999998" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <constraints>
+                                    <constraint firstItem="nIg-ez-N2J" firstAttribute="height" secondItem="rRo-dr-1GN" secondAttribute="height" constant="-20" id="2cx-Wp-1D3"/>
+                                    <constraint firstItem="nIg-ez-N2J" firstAttribute="centerY" secondItem="rRo-dr-1GN" secondAttribute="centerY" id="Aow-J2-EtX"/>
+                                    <constraint firstItem="nIg-ez-N2J" firstAttribute="centerX" secondItem="rRo-dr-1GN" secondAttribute="centerX" id="DSh-bL-FaZ"/>
+                                    <constraint firstItem="nIg-ez-N2J" firstAttribute="width" secondItem="rRo-dr-1GN" secondAttribute="width" constant="-20" id="civ-Ll-a7e"/>
+                                </constraints>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                        <color key="value" red="0.70980392160000005" green="0.82745098039999998" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                            </view>
+                        </subviews>
+                        <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="P0f-Qc-GSS" firstAttribute="width" secondItem="8YN-gM-ymv" secondAttribute="width" id="15Q-4t-71E"/>
+                            <constraint firstItem="rRo-dr-1GN" firstAttribute="top" secondItem="P0f-Qc-GSS" secondAttribute="bottom" id="40K-Ts-eE7"/>
+                            <constraint firstItem="rRo-dr-1GN" firstAttribute="width" secondItem="8YN-gM-ymv" secondAttribute="width" id="Jhr-rW-slc"/>
+                            <constraint firstItem="P0f-Qc-GSS" firstAttribute="top" secondItem="dOJ-i5-gIk" secondAttribute="bottom" id="WaW-Zq-Uf9"/>
+                            <constraint firstItem="P0f-Qc-GSS" firstAttribute="centerX" secondItem="8YN-gM-ymv" secondAttribute="centerX" id="gQv-36-Fxt"/>
+                            <constraint firstAttribute="bottom" secondItem="rRo-dr-1GN" secondAttribute="bottom" id="gzY-Cd-jBQ"/>
+                            <constraint firstItem="rRo-dr-1GN" firstAttribute="centerX" secondItem="8YN-gM-ymv" secondAttribute="centerX" id="yze-m6-yFy"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="0.0"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </view>
+                    <connections>
+                        <outlet property="btNext" destination="gEL-Ik-UfU" id="yfe-ny-2eZ"/>
+                        <outlet property="btPrev" destination="ean-uL-e8X" id="8ah-gF-AV8"/>
+                        <outlet property="lbDayMonth" destination="g7M-sJ-teh" id="Wwr-mS-Y3D"/>
+                        <outlet property="lbDayName" destination="TH3-vv-4wy" id="hbO-Yb-NUo"/>
+                        <outlet property="lbDayNumber" destination="EUB-BM-L7c" id="UjL-xN-CcE"/>
+                        <outlet property="svScheduleList" destination="bHp-Km-KNL" id="aSi-lC-w6H"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="rq0-MV-vyl" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-2839" y="1801"/>
+        </scene>
         <!--Sync-->
         <!--Sync-->
         <scene sceneID="cqg-BI-2xm">
         <scene sceneID="cqg-BI-2xm">
             <objects>
             <objects>

+ 13 - 0
app/LablancaView.swift

@@ -113,6 +113,12 @@ class LablancaView: UIView {
 			NSLog(":LABLANCA:ERROR: Error getting festivals info: \(error)")
 			NSLog(":LABLANCA:ERROR: Error getting festivals info: \(error)")
 		}
 		}
 		
 		
+		// Set up schedule buttons
+		let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(openSchedule(_:)))
+		fBtSchedule.isUserInteractionEnabled = true
+		fBtSchedule.addGestureRecognizer(tapRecognizer)
+		
+		
 		// Get info about the day prices.
 		// Get info about the day prices.
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.dateFormat = "yyyy-MM-dd"
 		dateFormatter.dateFormat = "yyyy-MM-dd"
@@ -185,6 +191,13 @@ class LablancaView: UIView {
 		// Nothing else to be done.
 		// Nothing else to be done.
 	}
 	}
 	
 	
+	func openSchedule(_ sender:UITapGestureRecognizer? = nil){
+		NSLog(":LABLANCA:DEBUG: Getting delegate and showing schedule.")
+		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
+		delegate.controller?.showSchedule(margolari: false)
+		NSLog(":LABLANCA:DEBUG: Schedule should be shown.")
+	}
+	
 	func getLanguage() -> String{
 	func getLanguage() -> String{
 		let pre = NSLocale.preferredLanguages[0].subStr(start: 0, end: 1)
 		let pre = NSLocale.preferredLanguages[0].subStr(start: 0, end: 1)
 		if(pre == "es" || pre == "en" || pre == "eu"){
 		if(pre == "es" || pre == "en" || pre == "eu"){

+ 1 - 1
app/LablancaView.xib

@@ -1,5 +1,5 @@
 <?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="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<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">
     <device id="retina4_7" orientation="portrait">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
         <adaptation id="fullscreen"/>
     </device>
     </device>

+ 141 - 0
app/RowSchedule.swift

@@ -0,0 +1,141 @@
+// Copyright (C) 2016 Inigo Valentin
+//
+// This file is part of the Gasteizko Margolariak IOS app.
+//
+// The Gasteizko Margolariak IOS app is free software: you can
+// redistribute it and/or modify it under the terms of the
+// GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your
+// option) any later version.
+//
+// The Gasteizko Margolariak IOS app is distributed in the
+// hope that it will be useful, but WITHOUT ANY WARRANTY;
+// without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+// Public License for more details.
+//
+// You should have received a copy of the GNU General Public
+// License along with the Gasteizko Margolariak IOS app.
+// If not, see <http://www.gnu.org/licenses/>.
+
+import Foundation
+import UIKit
+
+/**
+Extension of UIView to be formatted as sections.
+*/
+@IBDesignable class RowSchedule: 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!
+	
+	/**
+	Default constructor
+	*/
+	required init?(coder aDecoder: NSCoder) {
+		super.init(coder: aDecoder)
+	}
+	
+	private func loadViewFromNib() {
+		let bundle = Bundle(for: type(of: self))
+		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
+		nib.instantiate(withOwner: self, options: nil).first as! UIView
+	}
+	
+	/**
+	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)
+		
+		// Set tap recognizer
+		/*print("ROW_BLOG:DEBUG: set tap recognizer")
+		let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector (self.openPost (_:)))
+		tapRecognizer.delegate = (UIApplication.shared.delegate as! AppDelegate).controller
+		addGestureRecognizer(tapRecognizer)*/
+	}
+	
+	/**
+	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 setTime(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 setTime(hours: Int, minutes: Int){
+		self.lbTime.text = "\(hours):\(minutes)"
+	}
+	
+	/**
+	Sets the time of the event.
+	:param: dtime Datetime of the event start.
+	*/
+	func setTime(dtime: NSDate){
+		let dateformatter = DateFormatter()
+		let calendar = Calendar.current
+		let hours = calendar.component(.hour, from: dtime as Date)
+		let minutes = calendar.component(.minute, from: dtime as Date)
+		self.lbTime.text = "\(hours):\(minutes)"
+	}
+	
+	/**
+	Sets the title of the event.
+	:param: text The title of the event.
+	*/
+	func setTitle(text: String){
+		self.lbTitle.text = text
+	}
+	
+	/**
+	Sets the location of the event.
+	:param: text The location of the event.
+	*/
+	func setLocation(text: String){
+		self.lbLocation.text = text
+	}
+	
+	/**
+	Sets the description of the event. Decodes HTML.
+	:param: text The new text.
+	*/
+	func setText(text: String){
+		self.lbText.text = text.stripHtml()
+	}
+	
+	/**
+	Opens an event dialog.
+	*/
+	func openEvent(_ sender:UITapGestureRecognizer? = nil){
+		print("ROW_BLOG:DEBUG: openpost")
+	}
+}

+ 143 - 0
app/RowSchedule.xib

@@ -0,0 +1,143 @@
+<?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="RowSchedule" customModule="app">
+            <connections>
+                <outlet property="container" destination="HZR-5W-2l9" id="Pbz-zj-AcP"/>
+                <outlet property="lbLocation" destination="Edl-Ib-zzS" id="P41-6d-DGV"/>
+                <outlet property="lbText" destination="pCF-JC-n5h" id="yAA-gU-Dt5"/>
+                <outlet property="lbTime" destination="VVW-yL-wmh" id="PLK-PD-yaj"/>
+                <outlet property="lbTitle" destination="vSV-nw-MRt" id="LoG-Yq-S3M"/>
+            </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="HZR-5W-2l9" userLabel="Container">
+                    <rect key="frame" x="0.0" y="273.5" width="375" height="120"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ko7-ge-5ca" userLabel="Entry">
+                            <rect key="frame" x="10" y="10" width="355" height="120"/>
+                            <subviews>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VVW-yL-wmh" userLabel="Time">
+                                    <rect key="frame" x="10" y="10" width="55" height="22"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="55" id="qJV-iR-yg8"/>
+                                    </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" image="ScheduleLine" translatesAutoresizingMaskIntoConstraints="NO" id="q6x-38-7dL" userLabel="Line">
+                                    <rect key="frame" x="79" y="-0.5" width="2" height="120"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="2" id="Qy1-BX-GQH"/>
+                                    </constraints>
+                                </imageView>
+                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ScheduleBullet" translatesAutoresizingMaskIntoConstraints="NO" id="pxM-Zk-Eo7" userLabel="Bullet">
+                                    <rect key="frame" x="70" y="11" width="20" height="20"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="20" id="WHH-b4-kKt"/>
+                                        <constraint firstAttribute="height" constant="20" id="Ye0-5j-v5U"/>
+                                    </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="vSV-nw-MRt" userLabel="Title">
+                                    <rect key="frame" x="100" y="10" width="255" 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="pCF-JC-n5h" userLabel="Text">
+                                    <rect key="frame" x="110" y="37" width="235" 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="BmB-4o-ng5" userLabel="Pinpoint">
+                                    <rect key="frame" x="115" y="68" width="19" height="26"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="19" id="Biy-y3-MT7"/>
+                                        <constraint firstAttribute="height" constant="26" id="OQG-JA-m2Q"/>
+                                    </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="Edl-Ib-zzS">
+                                    <rect key="frame" x="139" y="72.5" width="206" height="18"/>
+                                    <fontDescription key="fontDescription" type="italicSystem" pointSize="15"/>
+                                    <color key="textColor" red="0.32931472081218272" green="0.32931472081218272" blue="0.32931472081218272" 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="Edl-Ib-zzS" firstAttribute="trailing" secondItem="pCF-JC-n5h" secondAttribute="trailing" id="1VK-ft-zMD"/>
+                                <constraint firstItem="VVW-yL-wmh" firstAttribute="leading" secondItem="ko7-ge-5ca" secondAttribute="leading" constant="10" id="2bv-NZ-02c"/>
+                                <constraint firstItem="vSV-nw-MRt" firstAttribute="centerY" secondItem="VVW-yL-wmh" secondAttribute="centerY" id="4zW-mq-1iT"/>
+                                <constraint firstItem="vSV-nw-MRt" firstAttribute="leading" secondItem="pxM-Zk-Eo7" secondAttribute="trailing" constant="10" id="7KL-GL-vCQ"/>
+                                <constraint firstItem="Edl-Ib-zzS" firstAttribute="leading" secondItem="BmB-4o-ng5" secondAttribute="trailing" constant="5" id="7k0-y1-elz"/>
+                                <constraint firstItem="BmB-4o-ng5" firstAttribute="leading" secondItem="pCF-JC-n5h" secondAttribute="leading" constant="5" id="EbO-2o-ewf"/>
+                                <constraint firstItem="q6x-38-7dL" firstAttribute="centerX" secondItem="pxM-Zk-Eo7" secondAttribute="centerX" id="FOh-uA-HYL"/>
+                                <constraint firstItem="VVW-yL-wmh" firstAttribute="top" secondItem="ko7-ge-5ca" secondAttribute="top" constant="10" id="MGt-lg-S7C"/>
+                                <constraint firstItem="BmB-4o-ng5" firstAttribute="top" secondItem="pCF-JC-n5h" secondAttribute="bottom" constant="10" id="MOh-Ga-NOQ"/>
+                                <constraint firstItem="pxM-Zk-Eo7" firstAttribute="centerY" secondItem="VVW-yL-wmh" secondAttribute="centerY" id="ORZ-Cx-D0o"/>
+                                <constraint firstItem="pCF-JC-n5h" firstAttribute="width" secondItem="vSV-nw-MRt" secondAttribute="width" constant="-20" id="ZWn-od-vpP"/>
+                                <constraint firstItem="pxM-Zk-Eo7" firstAttribute="leading" secondItem="VVW-yL-wmh" secondAttribute="trailing" constant="5" id="g87-LH-Iby"/>
+                                <constraint firstItem="pCF-JC-n5h" firstAttribute="top" secondItem="vSV-nw-MRt" secondAttribute="bottom" constant="5" id="h98-Dl-4cw"/>
+                                <constraint firstAttribute="trailing" secondItem="vSV-nw-MRt" secondAttribute="trailing" id="jLW-at-0mc"/>
+                                <constraint firstItem="q6x-38-7dL" firstAttribute="top" secondItem="ko7-ge-5ca" secondAttribute="top" id="mdq-SM-9G4"/>
+                                <constraint firstItem="pCF-JC-n5h" firstAttribute="centerX" secondItem="vSV-nw-MRt" secondAttribute="centerX" id="nM3-9e-iDR"/>
+                                <constraint firstItem="Edl-Ib-zzS" firstAttribute="centerY" secondItem="BmB-4o-ng5" secondAttribute="centerY" id="olt-3s-reR"/>
+                            </constraints>
+                            <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>
+                    </subviews>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="120" id="5eZ-Gg-zIC"/>
+                        <constraint firstAttribute="trailing" secondItem="ko7-ge-5ca" secondAttribute="trailing" constant="10" id="H98-ZX-xoZ"/>
+                        <constraint firstItem="ko7-ge-5ca" firstAttribute="bottom" secondItem="HZR-5W-2l9" secondAttribute="bottom" constant="10" id="O6V-Wc-nvy"/>
+                        <constraint firstItem="ko7-ge-5ca" firstAttribute="leading" secondItem="HZR-5W-2l9" secondAttribute="leading" constant="10" id="giZ-PP-oZq"/>
+                        <constraint firstItem="q6x-38-7dL" firstAttribute="height" secondItem="HZR-5W-2l9" secondAttribute="height" id="nyx-DR-DHI"/>
+                        <constraint firstAttribute="top" secondItem="ko7-ge-5ca" secondAttribute="top" constant="-10" id="odh-eT-v0E"/>
+                    </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="HZR-5W-2l9" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Lp5-k0-ysc"/>
+                <constraint firstItem="HZR-5W-2l9" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="QJ3-of-4nA"/>
+                <constraint firstItem="HZR-5W-2l9" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="lFR-Ff-arx"/>
+            </constraints>
+        </view>
+    </objects>
+    <resources>
+        <image name="Pinpoint" width="10" height="13"/>
+        <image name="ScheduleBullet" width="12" height="12"/>
+        <image name="ScheduleLine" width="1" height="2"/>
+    </resources>
+</document>

+ 185 - 0
app/ScheduleViewController.swift

@@ -0,0 +1,185 @@
+// 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
+
+/**
+The view controller of the app.
+*/
+class ScheduleViewController: UIViewController, UIGestureRecognizerDelegate {
+
+	// Outlets
+	@IBOutlet weak var btPrev: UIButton!
+	@IBOutlet weak var btNext: UIButton!
+	@IBOutlet weak var lbDayNumber: UILabel!
+	@IBOutlet weak var lbDayMonth: UILabel!
+	@IBOutlet weak var lbDayName: UILabel!
+	@IBOutlet weak var svScheduleList: UIStackView!
+	
+	// Margolari schedule indicator
+	var margolari: Bool = false
+	
+	// App delegate
+	var delegate: AppDelegate?
+	
+	func getContext () -> NSManagedObjectContext {
+		return NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType)
+	}
+	
+	/**
+	Run when the app loads.
+	*/
+	override func viewDidLoad() {
+		
+		NSLog(":SCHEDULECONTROLLER:LOG: Init schedule.")
+		
+		super.viewDidLoad()
+		self.loadSchedule(margolari: margolari)
+		
+		//TODO Title
+		
+		// TODO Set button action
+		//barButton.addTarget(self, action: #selector(self.back), for: .touchUpInside)
+	}
+	
+	/**
+	Returns to the main view controller.
+	*/
+	func back() {
+		NSLog(":SCHEDULECONTROLLER:DEBUG: Back")
+		self.dismiss(animated: true, completion: nil)
+	}
+	
+	
+	/**
+	Dispose of any resources that can be recreated.
+	*/
+	override func didReceiveMemoryWarning() {
+		super.didReceiveMemoryWarning()
+	}
+	
+	/**
+	Loads the schedule.
+	*/
+	public func loadSchedule(margolari: Bool){
+		
+		NSLog(":SCHEDULECONTROLLER:DEBUG: Loading schedule: Margolariak \(margolari)")
+		
+		var rowcount = 0
+		var row: RowSchedule
+		var start: NSDate
+		var title: String
+		var text: String
+		var locationId: Int
+		var location: String
+		
+		NSLog(":SCHEDULECONTROLLER:DEBUG: 1")
+		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
+		let appDelegate = UIApplication.shared.delegate as! AppDelegate
+		let lang : String = getLanguage()
+		NSLog(":SCHEDULECONTROLLER:DEBUG: 2")
+		context.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
+		let fetchRequest: NSFetchRequest<Festival_event> = Festival_event.fetchRequest()
+		let sortDescriptor = NSSortDescriptor(key: "start", ascending: false)
+		let sortDescriptors = [sortDescriptor]
+		NSLog(":SCHEDULECONTROLLER:DEBUG: 3")
+		fetchRequest.sortDescriptors = sortDescriptors
+		
+		if margolari == true{
+			fetchRequest.predicate = NSPredicate(format: "gm = %i", 1)
+		}
+		else{
+			fetchRequest.predicate = NSPredicate(format: "gm = %i", 0)
+		}
+		
+		// TODO: filter by date, not by number
+		fetchRequest.fetchLimit = 20
+		
+		NSLog(":SCHEDULECONTROLLER:DEBUG: 4")
+		
+		do {
+			
+			// Get the result
+			let searchResults = try context.fetch(fetchRequest)
+			NSLog(":SCHEDULECONTROLLER:DEBUG: 5")
+			
+			NSLog(":SCHEDULECONTROLLER:DEBUG: Total events: \(searchResults.count)")
+			
+			for r in searchResults as [NSManagedObject] {
+				
+				title = r.value(forKey: "title_\(lang)") as! String
+				if let tx = r.value(forKey: "description_\(lang)"){
+					text = r.value(forKey: "description_\(lang)") as! String
+				}
+				else{
+					text = ""
+				}
+				start = r.value(forKey: "start")! as! NSDate
+				locationId = r.value(forKey: "place")! as! Int
+				row = RowSchedule.init(s: "rowSchedule\(rowcount)", i: rowcount)
+				
+				row.setTitle(text: title)
+				row.setText(text: text)
+				row.setTime(dtime: start)
+				
+				// Get location info from Place entity
+				let locationFetchRequest: NSFetchRequest<Place> = Place.fetchRequest()
+				locationFetchRequest.predicate = NSPredicate(format: "id == %i", locationId)
+				locationFetchRequest.fetchLimit = 1
+				do{
+					var locationSearchResults = try context.fetch(locationFetchRequest)
+					var locationR = locationSearchResults[0]
+					location = locationR.value(forKey: "name_\(lang)")! as! String
+					
+					row.setLocation(text: location)
+				} catch {
+					NSLog(":SCHEDULECONTROLLER:ERROR: Error getting location: \(error)")
+				}
+				
+				NSLog(":SCHEDULECONTROLLER:DEBUG: Adding row: height: \(row.frame.height)")
+				svScheduleList.addArrangedSubview(row)
+				row.setNeedsLayout()
+				row.layoutIfNeeded()
+				
+				rowcount = rowcount + 1
+			}
+		} catch {
+			NSLog(":SCHEDULECONTROLLER:ERROR: Error with request: \(error)")
+		}
+
+	}
+	
+	/**
+	Gets the device language.
+	:return: Two letter language code of the device.
+	*/
+	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"
+		}
+	}
+	
+}
+

+ 6 - 3
app/Sync.swift

@@ -1663,8 +1663,11 @@ class Sync{
 			
 			
 			//Get host
 			//Get host
 			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
 			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
-			let host: Int = Int(str.subStr(start : str.indexOf(target : "\"host\":")! + 8, end : str.indexOf(target : ",\"")! - 2))!
-			row.setValue(host, forKey: "host")
+			let strHost: String = str.subStr(start : str.indexOf(target : "\"host\":")! + 8, end : str.indexOf(target : ",\"")! - 2)
+			if (strHost != "ul"){ //From "null"
+				let host: Int = Int(strHost)!
+				row.setValue(host, forKey: "host")
+			}
 			
 			
 			//Get place
 			//Get place
 			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
 			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
@@ -1680,7 +1683,7 @@ class Sync{
 			//Get end
 			//Get end
 			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
 			str = str.subStr(start : str.indexOf(target : ",\"")! + 1, end : str.length - 1)
 			dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
 			dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
-			let strEnd =  str.subStr(start : str.indexOf(target : "\"end\":")! + 7, end : str.length - 2)
+			let strEnd: String =  str.subStr(start : str.indexOf(target : "\"end\":")! + 7, end : str.length - 2)
 			if (strEnd != "ul"){ //From "null"
 			if (strEnd != "ul"){ //From "null"
 				let end = dateFormatter.date(from: strEnd)!
 				let end = dateFormatter.date(from: strEnd)!
 				row.setValue(end, forKey: "end")
 				row.setValue(end, forKey: "end")

+ 20 - 0
app/ViewController.swift

@@ -81,6 +81,18 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 		performSegue(withIdentifier: "SegueAlbum", sender: nil)
 		performSegue(withIdentifier: "SegueAlbum", sender: nil)
 	}
 	}
 	
 	
+	func showSchedule(margolari: Bool){
+		NSLog(":CONTROLLER:DEBUG: Showing schedule. Margolari: \(margolari)")
+		if margolari == true{
+			self.passId = 1
+		}
+		else{
+			self.passId = 0
+		}
+		// TODO: Uncomment when ready
+		performSegue(withIdentifier: "SegueSchedule", sender: nil)
+	}
+	
 	/**
 	/**
 	 Handles the initial sync process.
 	 Handles the initial sync process.
 	 It can start it, showing the sync screen, or finish it, hidding the screen.
 	 It can start it, showing the sync screen, or finish it, hidding the screen.
@@ -112,6 +124,14 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 		if segue.identifier == "SegueAlbum"{
 		if segue.identifier == "SegueAlbum"{
 			(segue.destination as! AlbumViewController).id = passId
 			(segue.destination as! AlbumViewController).id = passId
 		}
 		}
+		if segue.identifier == "SegueSchedule"{
+			if passId == 1{
+				(segue.destination as! ScheduleViewController).margolari = true
+			}
+			else{
+				(segue.destination as! ScheduleViewController).margolari = false
+			}
+		}
 		if segue.identifier == "SegueSync"{
 		if segue.identifier == "SegueSync"{
 			self.syncSegue = segue
 			self.syncSegue = segue
 		}
 		}