Bläddra i källkod

Whatsapp shortcout removed. Force sync on start. Shortcout to GM schedule in the home screen.

Iñigo Valentin 9 år sedan
förälder
incheckning
62d1672a50

+ 1 - 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" id="lgI-h9-O0s">
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" 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"/>

+ 3 - 1
app/EventController.swift

@@ -76,7 +76,9 @@ class EventController: UIViewController, UIGestureRecognizerDelegate {
 				let r = searchResults[0]
 				
 				name = r.value(forKey: "title_\(lang)")! as! String
-				text = r.value(forKey: "description_\(lang)")! as! String
+				if r.value(forKey: "description_\(lang)") != nil{
+					text = r.value(forKey: "description_\(lang)")! as! String
+				}
 				start = r.value(forKey: "start")! as! NSDate
 				placeId = r.value(forKey: "place")! as! Int
 				place = getPlace(place: placeId, lang: getLanguage(), context: context)

+ 15 - 0
app/HomeView.swift

@@ -34,6 +34,7 @@ class HomeView: UIView {
 	@IBOutlet weak var locationMessage: UILabel!
 	@IBOutlet weak var lablancaImage: UIImageView!
 	@IBOutlet weak var lablancaText: UILabel!
+	@IBOutlet weak var btSchedule: UIButton!
 	
 	//Each of the sections of the view.
 	@IBOutlet weak var locationSection: UIView!
@@ -226,6 +227,12 @@ class HomeView: UIView {
 							let path = "img/fiestas/thumb/\(filename)"
 							self.lablancaImage.setImage(localPath: path, remotePath: "https://margolariak.com/\(path)")
 						}
+						
+						// Set button up
+	
+						let tapRecognizerGMSchedule = UITapGestureRecognizer(target: self, action: #selector(openGMSchedule(_:)))
+						btSchedule.isUserInteractionEnabled = true
+						btSchedule.addGestureRecognizer(tapRecognizerGMSchedule)
 					}
 					
 				}
@@ -576,4 +583,12 @@ class HomeView: UIView {
 		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
 		delegate.controller?.showComponent(selected: 1)
 	}
+	
+	/**
+	Commands the view controller to show the Gasteizko Margolariak schedule view.
+	*/
+	func openGMSchedule(_ sender:UITapGestureRecognizer? = nil){
+		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
+		delegate.controller?.showSchedule(margolari: true)
+	}
 }

+ 42 - 16
app/HomeView.xib

@@ -1,17 +1,18 @@
 <?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">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina3_5" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HomeView" customModule="app" customModuleProvider="target">
             <connections>
                 <outlet property="blogSection" destination="uHa-Mu-U68" id="RUp-Jg-AxI"/>
+                <outlet property="btSchedule" destination="0Uj-NF-epp" id="aGQ-e4-cjo"/>
                 <outlet property="container" destination="iN0-l3-epB" id="cfT-rm-jA0"/>
                 <outlet property="futureActivitiesSection" destination="FQo-nm-4Mo" id="TAU-5k-Sc5"/>
                 <outlet property="gallerySection" destination="v6A-Ya-esA" id="TPS-Ut-DK1"/>
@@ -34,7 +35,7 @@
                     <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
                     <subviews>
                         <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="gOz-rr-CeQ">
-                            <rect key="frame" x="0.0" y="0.0" width="320" height="1144"/>
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="1174"/>
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ljm-NP-c4e">
                                     <rect key="frame" x="0.0" y="0.0" width="320" height="157"/>
@@ -133,10 +134,10 @@
                                     </userDefinedRuntimeAttributes>
                                 </view>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9nu-j1-wGI">
-                                    <rect key="frame" x="0.0" y="167" width="320" height="157"/>
+                                    <rect key="frame" x="0.0" y="167" width="320" height="187"/>
                                     <subviews>
                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RyS-ln-grn" userLabel="LablancaContainer">
-                                            <rect key="frame" x="9.5" y="10" width="300" height="137"/>
+                                            <rect key="frame" x="9.5" y="10" width="300" height="167"/>
                                             <subviews>
                                                 <textView clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" text="La Blanca" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="ftX-qb-57S">
                                                     <rect key="frame" x="0.0" y="0.0" width="300" height="27"/>
@@ -149,17 +150,17 @@
                                                     <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
                                                 </textView>
                                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fBq-qg-fz9" userLabel="Entry">
-                                                    <rect key="frame" x="10" y="37" width="280" height="90"/>
+                                                    <rect key="frame" x="10" y="37" width="280" height="120"/>
                                                     <subviews>
                                                         <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PhotoPlaceholder" translatesAutoresizingMaskIntoConstraints="NO" id="gkF-He-baV">
-                                                            <rect key="frame" x="10" y="9.5" width="70" height="70"/>
+                                                            <rect key="frame" x="10" y="9.5" width="70" height="100"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="70" id="ChM-hX-OnO"/>
-                                                                <constraint firstAttribute="height" constant="70" id="hNg-Je-ufU"/>
+                                                                <constraint firstAttribute="height" constant="100" id="hNg-Je-ufU"/>
                                                             </constraints>
                                                         </imageView>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¡Gasteizko Margolariak está por ahí!" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YsW-Bq-7gd" userLabel="Text">
-                                                            <rect key="frame" x="95" y="10" width="175" height="70"/>
+                                                            <rect key="frame" x="95" y="9.5" width="175" height="70"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="70" id="Txi-or-Pra"/>
                                                             </constraints>
@@ -167,14 +168,39 @@
                                                             <nil key="textColor"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0Uj-NF-epp">
+                                                            <rect key="frame" x="95" y="84.5" width="175" height="25"/>
+                                                            <color key="backgroundColor" red="0.070588235289999995" green="0.27058823529999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/>
+                                                            <constraints>
+                                                                <constraint firstAttribute="height" constant="25" id="FLs-1o-qFc"/>
+                                                            </constraints>
+                                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
+                                                            <state key="normal" title="Programa Margolari">
+                                                                <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                            </state>
+                                                            <userDefinedRuntimeAttributes>
+                                                                <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                                                    <color key="value" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                                </userDefinedRuntimeAttribute>
+                                                                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                                                    <real key="value" value="2"/>
+                                                                </userDefinedRuntimeAttribute>
+                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                                    <real key="value" value="4"/>
+                                                                </userDefinedRuntimeAttribute>
+                                                            </userDefinedRuntimeAttributes>
+                                                        </button>
                                                     </subviews>
                                                     <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                                     <constraints>
+                                                        <constraint firstItem="0Uj-NF-epp" firstAttribute="width" secondItem="YsW-Bq-7gd" secondAttribute="width" id="IXJ-HM-zRq"/>
                                                         <constraint firstItem="gkF-He-baV" firstAttribute="centerY" secondItem="fBq-qg-fz9" secondAttribute="centerY" id="Pi9-t0-oOa"/>
+                                                        <constraint firstItem="YsW-Bq-7gd" firstAttribute="top" secondItem="gkF-He-baV" secondAttribute="top" id="QD3-cb-GzW"/>
                                                         <constraint firstAttribute="trailing" secondItem="YsW-Bq-7gd" secondAttribute="trailing" constant="10" id="VAj-dj-MLd"/>
-                                                        <constraint firstItem="YsW-Bq-7gd" firstAttribute="centerY" secondItem="fBq-qg-fz9" secondAttribute="centerY" id="jjq-4v-b9d"/>
+                                                        <constraint firstItem="0Uj-NF-epp" firstAttribute="centerX" secondItem="YsW-Bq-7gd" secondAttribute="centerX" id="W8l-1A-GfM"/>
+                                                        <constraint firstItem="0Uj-NF-epp" firstAttribute="bottom" secondItem="gkF-He-baV" secondAttribute="bottom" id="XDn-Sz-gbY"/>
                                                         <constraint firstItem="gkF-He-baV" firstAttribute="leading" secondItem="fBq-qg-fz9" secondAttribute="leading" constant="10" id="jtF-UZ-btH"/>
-                                                        <constraint firstItem="YsW-Bq-7gd" firstAttribute="height" secondItem="fBq-qg-fz9" secondAttribute="height" constant="-20" id="uVT-PP-R5k"/>
+                                                        <constraint firstItem="gkF-He-baV" firstAttribute="height" secondItem="fBq-qg-fz9" secondAttribute="height" constant="-20" id="lvX-fT-s23"/>
                                                         <constraint firstItem="YsW-Bq-7gd" firstAttribute="leading" secondItem="gkF-He-baV" secondAttribute="trailing" constant="15" id="zdn-rO-ngp"/>
                                                     </constraints>
                                                     <userDefinedRuntimeAttributes>
@@ -221,16 +247,16 @@
                                     </constraints>
                                 </view>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FQo-nm-4Mo" customClass="Section" customModule="app">
-                                    <rect key="frame" x="0.0" y="334" width="320" height="50"/>
+                                    <rect key="frame" x="0.0" y="364" width="320" height="50"/>
                                 </view>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uHa-Mu-U68" customClass="Section" customModule="app">
-                                    <rect key="frame" x="0.0" y="394" width="320" height="50"/>
+                                    <rect key="frame" x="0.0" y="424" width="320" height="50"/>
                                 </view>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="v6A-Ya-esA" customClass="Section" customModule="app" customModuleProvider="target">
-                                    <rect key="frame" x="0.0" y="454" width="320" height="200"/>
+                                    <rect key="frame" x="0.0" y="484" width="320" height="200"/>
                                 </view>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fZk-r1-Tca" customClass="Section" customModule="app">
-                                    <rect key="frame" x="0.0" y="664" width="320" height="350"/>
+                                    <rect key="frame" x="0.0" y="694" width="320" height="350"/>
                                     <userDefinedRuntimeAttributes>
                                         <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
                                             <real key="value" value="0.0"/>
@@ -238,7 +264,7 @@
                                     </userDefinedRuntimeAttributes>
                                 </view>
                                 <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dgk-s8-xje" customClass="Section" customModule="app">
-                                    <rect key="frame" x="0.0" y="1024" width="320" height="120"/>
+                                    <rect key="frame" x="0.0" y="1054" width="320" height="120"/>
                                 </view>
                             </subviews>
                             <color key="backgroundColor" red="1" green="1" blue="0.42787000868055558" alpha="1" colorSpace="calibratedRGB"/>

+ 2 - 2
app/LablancaView.xib

@@ -1,11 +1,11 @@
 <?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">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" 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"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
         <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>

+ 0 - 13
app/RowHomeSocial.swift

@@ -35,7 +35,6 @@ Extension of UIView to be formatted as sections.
 	//The buttons
 	@IBOutlet weak var btnPhone: UIImageView!
 	@IBOutlet weak var btnMail: UIImageView!
-	@IBOutlet weak var btnWhatsapp: UIImageView!
 	@IBOutlet weak var btnFacebook: UIImageView!
 	@IBOutlet weak var btnTwitter: UIImageView!
 	@IBOutlet weak var btnGoogle: UIImageView!
@@ -83,9 +82,6 @@ Extension of UIView to be formatted as sections.
 		let mailTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapMail))
 		btnMail.isUserInteractionEnabled = true
 		btnMail.addGestureRecognizer(mailTapRecognizer)
-		let whatsappTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapWhatsapp))
-		btnWhatsapp.isUserInteractionEnabled = true
-		btnWhatsapp.addGestureRecognizer(whatsappTapRecognizer)
 		let facebookTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapFacebook))
 		btnFacebook.isUserInteractionEnabled = true
 		btnFacebook.addGestureRecognizer(facebookTapRecognizer)
@@ -128,15 +124,6 @@ Extension of UIView to be formatted as sections.
 	}
 	
 	
-	/**
-	Called when the Whatsapp button is tapped.
-	*/
-	func didTapWhatsapp() {
-		//As of today, imposible
-		//UIApplication.shared.openURL(NSURL(string: "+34637140371") as! URL)
-	}
-	
-	
 	/**
 	Called when the Facebook button is tapped.
 	*/

+ 17 - 26
app/RowHomeSocial.xib

@@ -1,11 +1,12 @@
 <?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">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" 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"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+        <capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
         <capability name="Aspect ratio constraints" 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"/>
@@ -19,7 +20,6 @@
                 <outlet property="btnMail" destination="5Xa-Sh-XrB" id="HCb-xY-VDs"/>
                 <outlet property="btnPhone" destination="512-B2-6nt" id="C2I-qn-kPa"/>
                 <outlet property="btnTwitter" destination="Ttk-Ce-1XP" id="JUs-rm-Q5M"/>
-                <outlet property="btnWhatsapp" destination="0jq-K4-utG" id="d7P-Md-D7b"/>
                 <outlet property="btnYoutube" destination="1qd-jG-4Bn" id="WVU-fK-qg1"/>
                 <outlet property="container" destination="2hI-rc-KPm" id="Qyi-RK-3V8"/>
                 <outlet property="entry" destination="wLM-VU-VYk" id="ebu-Wm-4By"/>
@@ -37,31 +37,27 @@
                             <rect key="frame" x="10" y="10" width="355" height="177.5"/>
                             <subviews>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" image="Phone" translatesAutoresizingMaskIntoConstraints="NO" id="512-B2-6nt">
-                                    <rect key="frame" x="7" y="7" width="75" height="75"/>
+                                    <rect key="frame" x="51.5" y="7" width="75" height="75"/>
                                 </imageView>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" image="Mail" translatesAutoresizingMaskIntoConstraints="NO" id="5Xa-Sh-XrB" userLabel="Mail">
-                                    <rect key="frame" x="96" y="7" width="75" height="75"/>
-                                    <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
-                                </imageView>
-                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" image="Whatsapp" translatesAutoresizingMaskIntoConstraints="NO" id="0jq-K4-utG" userLabel="Whatsapp">
-                                    <rect key="frame" x="185" y="7" width="75" height="75"/>
+                                    <rect key="frame" x="140.5" y="7" width="75" height="75"/>
                                     <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                                 </imageView>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" image="Facebook" translatesAutoresizingMaskIntoConstraints="NO" id="wP8-1o-Rrh" userLabel="Facebook">
-                                    <rect key="frame" x="274" y="7" width="75" height="75"/>
+                                    <rect key="frame" x="229.5" y="7" width="75" height="75"/>
                                     <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                                 </imageView>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" image="Twitter" translatesAutoresizingMaskIntoConstraints="NO" id="Ttk-Ce-1XP">
                                     <rect key="frame" x="7" y="96" width="75" height="74.5"/>
                                 </imageView>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" image="GooglePlus" translatesAutoresizingMaskIntoConstraints="NO" id="L4k-eK-pkc">
-                                    <rect key="frame" x="96.5" y="96" width="75.5" height="74.5"/>
+                                    <rect key="frame" x="96" y="96" width="75.5" height="74.5"/>
                                 </imageView>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" image="Youtube" translatesAutoresizingMaskIntoConstraints="NO" id="1qd-jG-4Bn">
                                     <rect key="frame" x="185" y="96" width="75.5" height="75"/>
                                 </imageView>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" image="Instagram" translatesAutoresizingMaskIntoConstraints="NO" id="OlS-ga-Ngl">
-                                    <rect key="frame" x="274" y="96" width="75.5" height="75"/>
+                                    <rect key="frame" x="274.5" y="96" width="75.5" height="75"/>
                                 </imageView>
                             </subviews>
                             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
@@ -71,34 +67,30 @@
                                 <constraint firstItem="wP8-1o-Rrh" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="7" id="3xb-00-2P6"/>
                                 <constraint firstItem="5Xa-Sh-XrB" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" constant="-14" id="7T1-Hk-R35"/>
                                 <constraint firstItem="Ttk-Ce-1XP" firstAttribute="top" secondItem="512-B2-6nt" secondAttribute="bottom" constant="14" id="9F0-DU-FFO"/>
-                                <constraint firstItem="0jq-K4-utG" firstAttribute="leading" secondItem="5Xa-Sh-XrB" secondAttribute="trailing" constant="14" id="AH1-0L-nYQ"/>
-                                <constraint firstItem="1qd-jG-4Bn" firstAttribute="height" secondItem="0jq-K4-utG" secondAttribute="height" id="CUC-LH-oVM"/>
-                                <constraint firstItem="wP8-1o-Rrh" firstAttribute="leading" secondItem="0jq-K4-utG" secondAttribute="trailing" constant="14" id="IM6-dv-FSu"/>
+                                <constraint firstItem="1qd-jG-4Bn" firstAttribute="leading" secondItem="L4k-eK-pkc" secondAttribute="trailing" constant="14" id="DHd-iN-xFN"/>
                                 <constraint firstItem="L4k-eK-pkc" firstAttribute="height" secondItem="5Xa-Sh-XrB" secondAttribute="height" id="IWg-0Z-7tO"/>
                                 <constraint firstItem="L4k-eK-pkc" firstAttribute="top" secondItem="5Xa-Sh-XrB" secondAttribute="bottom" constant="14" id="Jf9-UI-kn3"/>
-                                <constraint firstItem="L4k-eK-pkc" firstAttribute="leading" secondItem="5Xa-Sh-XrB" secondAttribute="leading" id="Lkg-Ff-jNA"/>
+                                <constraint firstItem="L4k-eK-pkc" firstAttribute="leading" secondItem="Ttk-Ce-1XP" secondAttribute="trailing" constant="14" id="JnS-QY-dWB"/>
                                 <constraint firstItem="wP8-1o-Rrh" firstAttribute="height" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" constant="-14" id="Lyv-es-d3j"/>
                                 <constraint firstItem="512-B2-6nt" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" constant="-14" id="MYA-FO-b5k"/>
-                                <constraint firstItem="1qd-jG-4Bn" firstAttribute="top" secondItem="0jq-K4-utG" secondAttribute="bottom" constant="14" id="QMP-Gi-WCw"/>
-                                <constraint firstItem="0jq-K4-utG" firstAttribute="height" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" constant="-14" id="RPd-iR-02y"/>
+                                <constraint firstItem="OlS-ga-Ngl" firstAttribute="leading" secondItem="1qd-jG-4Bn" secondAttribute="trailing" constant="14" id="Q2E-ks-nal"/>
+                                <constraint firstItem="wP8-1o-Rrh" firstAttribute="leading" secondItem="5Xa-Sh-XrB" secondAttribute="trailing" constant="14" id="RoW-RW-ffL"/>
                                 <constraint firstItem="512-B2-6nt" firstAttribute="height" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" constant="-14" id="Z1m-CY-xaF"/>
                                 <constraint firstItem="5Xa-Sh-XrB" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="7" id="aFU-bQ-Y2T"/>
-                                <constraint firstItem="OlS-ga-Ngl" firstAttribute="leading" secondItem="wP8-1o-Rrh" secondAttribute="leading" id="aGq-AJ-HXg"/>
                                 <constraint firstItem="5Xa-Sh-XrB" firstAttribute="height" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" constant="-14" id="agd-tD-Z7B"/>
                                 <constraint firstItem="L4k-eK-pkc" firstAttribute="width" secondItem="5Xa-Sh-XrB" secondAttribute="width" id="bD5-gc-RZQ"/>
                                 <constraint firstItem="OlS-ga-Ngl" firstAttribute="width" secondItem="wP8-1o-Rrh" secondAttribute="width" id="bil-4K-d7f"/>
-                                <constraint firstItem="Ttk-Ce-1XP" firstAttribute="leading" secondItem="512-B2-6nt" secondAttribute="leading" id="fMj-Zv-80b"/>
+                                <constraint firstItem="1qd-jG-4Bn" firstAttribute="height" secondItem="L4k-eK-pkc" secondAttribute="height" id="fYX-Si-Gp5"/>
                                 <constraint firstItem="wP8-1o-Rrh" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" constant="-14" id="gjG-xf-f2v"/>
+                                <constraint firstItem="Ttk-Ce-1XP" firstAttribute="leading" secondItem="wLM-VU-VYk" secondAttribute="leading" constant="7" id="hQg-Db-eah"/>
                                 <constraint firstItem="5Xa-Sh-XrB" firstAttribute="leading" secondItem="512-B2-6nt" secondAttribute="trailing" constant="14" id="iay-5b-e6B"/>
-                                <constraint firstItem="1qd-jG-4Bn" firstAttribute="width" secondItem="0jq-K4-utG" secondAttribute="width" id="jDu-hC-arJ"/>
                                 <constraint firstAttribute="height" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.5" id="jGP-1G-1P3"/>
                                 <constraint firstItem="512-B2-6nt" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="7" id="lyN-c0-DOH"/>
-                                <constraint firstItem="0jq-K4-utG" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="7" id="nUV-gk-zhw"/>
-                                <constraint firstItem="0jq-K4-utG" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" constant="-14" id="uCp-Vv-c61"/>
+                                <constraint firstItem="1qd-jG-4Bn" firstAttribute="centerY" secondItem="L4k-eK-pkc" secondAttribute="centerY" id="qoI-lN-Vto"/>
                                 <constraint firstItem="OlS-ga-Ngl" firstAttribute="top" secondItem="wP8-1o-Rrh" secondAttribute="bottom" constant="14" id="vCU-hL-wuO"/>
-                                <constraint firstItem="512-B2-6nt" firstAttribute="leading" secondItem="wLM-VU-VYk" secondAttribute="leading" constant="7" id="wMJ-K2-1e9"/>
+                                <constraint firstItem="1qd-jG-4Bn" firstAttribute="width" secondItem="L4k-eK-pkc" secondAttribute="width" id="vyj-8L-OtA"/>
                                 <constraint firstItem="OlS-ga-Ngl" firstAttribute="height" secondItem="wP8-1o-Rrh" secondAttribute="height" id="xZ5-XM-Ixz"/>
-                                <constraint firstItem="1qd-jG-4Bn" firstAttribute="leading" secondItem="0jq-K4-utG" secondAttribute="leading" id="zfP-9S-Gfc"/>
+                                <constraint firstItem="512-B2-6nt" firstAttribute="leading" secondItem="Ttk-Ce-1XP" secondAttribute="centerX" constant="7" id="zqm-aZ-Hwg"/>
                             </constraints>
                             <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
                             <userDefinedRuntimeAttributes>
@@ -149,7 +141,6 @@
         <image name="Mail" width="105" height="105"/>
         <image name="Phone" width="105" height="105"/>
         <image name="Twitter" width="105" height="105"/>
-        <image name="Whatsapp" width="105" height="105"/>
         <image name="Youtube" width="105" height="105"/>
     </resources>
 </document>

+ 0 - 1
app/ScheduleViewController.swift

@@ -178,7 +178,6 @@ class ScheduleViewController: UIViewController, UIGestureRecognizerDelegate {
 			v.removeFromSuperview()
 		}
 		
-		// TODO: Set toolbar elements.
 		if margolari == true{
 			let dayFetchRequest: NSFetchRequest<Festival_day> = Festival_day.fetchRequest()
 			dayFetchRequest.predicate = NSPredicate(format: "date = %@", argumentArray: [days[selectedDay]])

+ 1 - 0
app/ViewController.swift

@@ -208,6 +208,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 		self.delegate?.controller = self
 		
 		super.viewDidLoad()
+		Sync()
 		
 	}