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

Future activies shown with itinerary.

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

+ 12 - 0
app.xcodeproj/project.pbxproj

@@ -68,6 +68,9 @@
 		93BAD2F61E586310009DF853 /* RowHomeSocial.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93BAD2F51E586310009DF853 /* RowHomeSocial.xib */; };
 		93BAD2F81E586741009DF853 /* RowHomeSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BAD2F71E586741009DF853 /* RowHomeSocial.swift */; };
 		93BEB6D21E7E878300C68DE5 /* PostViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BEB6D11E7E878300C68DE5 /* PostViewController.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 */; };
 		93D9EA641DE273FD00089002 /* Section.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA631DE273FD00089002 /* Section.swift */; };
 		93D9EA681DE342AC00089002 /* UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D9EA671DE342AC00089002 /* UIView.swift */; };
@@ -154,6 +157,9 @@
 		93BAD2F51E586310009DF853 /* RowHomeSocial.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowHomeSocial.xib; 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>"; };
+		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>"; };
 		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>"; };
@@ -287,6 +293,9 @@
 				93B9113E1ED7582B0061BA71 /* LocationView.swift */,
 				93B9115E1ED765510061BA71 /* app-Bridging-Header.h */,
 				93EE9ECA1EE9B87100288F6E /* PastActivityViewController.swift */,
+				93D8B0971EF1B99A008BD946 /* RowItinerary.swift */,
+				93D8B0991EF1BA03008BD946 /* RowItinerary.xib */,
+				93D8B0951EF1B98E008BD946 /* FutureActivityViewController.swift */,
 			);
 			path = app;
 			sourceTree = "<group>";
@@ -384,6 +393,7 @@
 			files = (
 				93E0C5E21EB7E7F000905811 /* ActivitiesView.xib in Resources */,
 				931AA5AE1E218D0E003A2290 /* Entry.xib in Resources */,
+				93D8B09A1EF1BA03008BD946 /* RowItinerary.xib in Resources */,
 				93E0C5E81EBDF0E700905811 /* RowFutureActivity.xib in Resources */,
 				938D211D1EA2275300C47EC3 /* LablancaView.xib in Resources */,
 				93075C721E59D06900396389 /* RowBlog.xib in Resources */,
@@ -432,6 +442,7 @@
 				93294FFA1E337D0D00FDAF50 /* RowHomePastActivities.swift in Sources */,
 				93B5C01A1E872B4B0069BFF8 /* RowHomeGallery.swift in Sources */,
 				935892D01E493C2300E1CD5F /* UIImageView.swift in Sources */,
+				93D8B0981EF1B99A008BD946 /* RowItinerary.swift in Sources */,
 				93D9EA761DE3ACBB00089002 /* Sync.swift in Sources */,
 				93E0C5EA1EBDFFB400905811 /* RowPastActivity.swift in Sources */,
 				93BAD2F41E585EE6009DF853 /* RowHomeFutureActivities.swift in Sources */,
@@ -440,6 +451,7 @@
 				93B84B9C1D9C31AB006C0F67 /* ViewController.swift in Sources */,
 				93075C6C1E59CB6B00396389 /* BlogView.swift in Sources */,
 				93B84B9A1D9C31AB006C0F67 /* AppDelegate.swift in Sources */,
+				93D8B0961EF1B98E008BD946 /* FutureActivityViewController.swift in Sources */,
 				93B84BA21D9C31AB006C0F67 /* app.xcdatamodeld in Sources */,
 				935D6E331E867C7E00CED3A1 /* RowGallery.swift in Sources */,
 				93EB2F0C1EBF5AEB00F64186 /* RowSchedule.swift in Sources */,

+ 253 - 1
app/Base.lproj/Main.storyboard

@@ -16,7 +16,7 @@
         <scene sceneID="e3W-6Z-Jyk">
             <objects>
                 <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"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <color key="backgroundColor" red="0.4079896717" green="1" blue="0.34807942549999998" alpha="1" colorSpace="calibratedRGB"/>
@@ -200,6 +200,7 @@
                         <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="jfx-Q2-RtY" kind="show" identifier="SeguePastActivity" id="MmG-k2-wHn"/>
+                        <segue destination="DDO-dI-c0J" kind="show" identifier="SegueFutureActivity" id="ec7-aO-4Ac"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
@@ -1239,6 +1240,257 @@
                 <placeholder placeholderIdentifier="IBFirstResponder" id="YKC-ZH-aSz" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
         </scene>
+        <!--Future Activity View Controller-->
+        <scene sceneID="thm-MM-5qk">
+            <objects>
+                <viewController id="DDO-dI-c0J" customClass="FutureActivityViewController" customModule="app" customModuleProvider="target" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="yac-Xq-lM3"/>
+                        <viewControllerLayoutGuide type="bottom" id="94e-TO-KhL"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Tll-v9-w0T">
+                        <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="Wso-as-8H4" userLabel="Toolbar">
+                                <rect key="frame" x="0.0" y="20" width="375" height="30"/>
+                                <subviews>
+                                    <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"/>
+                                        <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="v7W-BZ-qle">
+                                        <rect key="frame" x="56.5" y="0.0" width="262.5" 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="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>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sqd-hf-hGI" userLabel="Cont">
+                                <rect key="frame" x="0.0" y="50" width="375" height="617"/>
+                                <subviews>
+                                    <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>
+                                            <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>
+                                                    <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>
+                                                            <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>
+                                                                    <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>
+                                                                <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>
+                                                            <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>
+                                                                    <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>
+                                                                <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"/>
+                                                        <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="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>
+                                        <color key="backgroundColor" red="0.70980392160000005" green="0.82745098039999998" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <constraints>
+                                            <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>
+                                        <edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
+                                        <userDefinedRuntimeAttributes>
+                                            <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                                <real key="value" value="0.0"/>
+                                            </userDefinedRuntimeAttribute>
+                                        </userDefinedRuntimeAttributes>
+                                    </scrollView>
+                                </subviews>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                <constraints>
+                                    <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>
+                                <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.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <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>
+                    </view>
+                    <connections>
+                        <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>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="IHt-fO-2Q0" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="1302" y="-403"/>
+        </scene>
     </scenes>
     <resources>
         <image name="GM" width="120" height="120"/>

+ 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"?>
-<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">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <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"/>
     </dependencies>
     <objects>
@@ -24,7 +24,7 @@
                 <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"/>
                     <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"/>
                             <subviews>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3TY-0K-6q1" customClass="Section" customModule="app">

+ 2 - 5
app/PastActivityViewController.swift

@@ -65,7 +65,6 @@ class PastActivityViewController: UIViewController, UIGestureRecognizerDelegate
 	Dismisses the controller.
 	*/
 	func back() {
-		NSLog(":FUTUREACTIVITYCONTROLLER:CONTROLLER:DEBUG: Back")
 		self.dismiss(animated: true, completion: nil)
 	}
 	
@@ -84,8 +83,6 @@ class PastActivityViewController: UIViewController, UIGestureRecognizerDelegate
 	*/
 	public func loadActivity(id: Int){
 		
-		NSLog(":PASTACTIVITYCONTROLLER:DEBUG: Loading past activity \(id)")
-		
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let lang : String = getLanguage()
@@ -131,12 +128,12 @@ class PastActivityViewController: UIViewController, UIGestureRecognizerDelegate
 						self.activityImage.setImage(localPath: path, remotePath: "https://margolariak.com/\(path)")
 					}
 				} catch {
-					NSLog(":PASTACTIVITYCONTROLLER:DEBUG: Error getting image for post \(id): \(error)")
+					NSLog(":PASTACTIVITYCONTROLLER:ERROR: Error getting image for past activity \(id): \(error)")
 				}
 				
 			}
 		} catch {
-			NSLog(":PASTACTIVITYCONTROLLER:DEBUG: Error with request: \(error)")
+			NSLog(":PASTACTIVITYCONTROLLER:ERROR: Error loading past activity: \(error)")
 		}
 	}
 	

+ 1 - 1
app/RowFutureActivity.swift

@@ -205,6 +205,6 @@ Extension of UIView to be formatted as future activity rows.
 	func openActivity(_ sender:UITapGestureRecognizer? = nil){
 		NSLog(":ROWFUTUREACTIVITY:DEBUG: Getting delegate and showing past activity \(self.id).")
 		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
-		delegate.controller?.showPastActivity(id: self.id)
+		delegate.controller?.showFutureActivity(id: self.id)
 	}
 }

+ 19 - 19
app/RowFutureActivity.xib

@@ -1,11 +1,11 @@
 <?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">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
         <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -27,10 +27,10 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <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>
                         <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>
                                 <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"/>
@@ -39,35 +39,35 @@
                                     <nil key="highlightedColor"/>
                                 </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">
-                                    <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"/>
                                     <nil key="highlightedColor"/>
                                 </label>
-                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="xIf-kY-gPW" userLabel="Image">
-                                    <rect key="frame" x="10" y="53" width="71" height="64"/>
+                                <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"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="64" id="GGt-lC-syI"/>
                                     </constraints>
                                 </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">
-                                    <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"/>
                                     <nil key="textColor"/>
                                     <nil key="highlightedColor"/>
                                 </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">
-                                    <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"/>
                                     <nil key="highlightedColor"/>
                                 </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">
-                                    <rect key="frame" x="285" y="119" width="50" height="21"/>
+                                    <rect key="frame" x="285" y="144" width="50" height="21"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="50" id="uI7-D4-q0g"/>
                                     </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"/>
                                     <nil key="highlightedColor"/>
                                 </label>
@@ -75,7 +75,7 @@
                             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                             <constraints>
                                 <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="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"/>
@@ -83,14 +83,14 @@
                                 <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="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 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 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="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>
                             <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                             <userDefinedRuntimeAttributes>
@@ -111,7 +111,7 @@
                         <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="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>
                     <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                     <userDefinedRuntimeAttributes>

+ 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).first
+	}
+	
+	
+	/**
+	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>

+ 2 - 4
app/ViewController.swift

@@ -109,8 +109,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	func showFutureActivity(id: Int){
 		NSLog(":CONTROLLER:DEBUG: Showing future activity \(id)")
 		self.passId = id
-		// TODO
-		//performSegue(withIdentifier: "SegueFutureActivity", sender: nil)
+		performSegue(withIdentifier: "SegueFutureActivity", sender: nil)
 	}
 	
 	
@@ -189,8 +188,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 			(segue.destination as! PastActivityViewController).id = passId
 		}
 		if segue.identifier == "SegueFutureActivity"{
-			// TODO
-			//(segue.destination as! FutureActivityViewController).id = passId
+			(segue.destination as! FutureActivityViewController).id = passId
 		}
 	}