Jelajahi Sumber

Merge branch 'Home'

Iñigo Valentin 9 tahun lalu
induk
melakukan
4ace41b52d
41 mengubah file dengan 1132 tambahan dan 4 penghapusan
  1. 24 0
      app.xcodeproj/project.pbxproj
  2. 6 0
      app/Assets.xcassets/Social/Contents.json
  3. 23 0
      app/Assets.xcassets/Social/Facebook.imageset/Contents.json
  4. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Facebook.imageset/social_facebook-1.png
  5. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Facebook.imageset/social_facebook-2.png
  6. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Facebook.imageset/social_facebook.png
  7. 23 0
      app/Assets.xcassets/Social/GooglePlus.imageset/Contents.json
  8. TEMPAT SAMPAH
      app/Assets.xcassets/Social/GooglePlus.imageset/social_googleplus-1.png
  9. TEMPAT SAMPAH
      app/Assets.xcassets/Social/GooglePlus.imageset/social_googleplus-2.png
  10. TEMPAT SAMPAH
      app/Assets.xcassets/Social/GooglePlus.imageset/social_googleplus.png
  11. 23 0
      app/Assets.xcassets/Social/Instagram.imageset/Contents.json
  12. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Instagram.imageset/social_instagram-1.png
  13. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Instagram.imageset/social_instagram-2.png
  14. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Instagram.imageset/social_instagram.png
  15. 23 0
      app/Assets.xcassets/Social/Mail.imageset/Contents.json
  16. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Mail.imageset/social_mail-1.png
  17. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Mail.imageset/social_mail-2.png
  18. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Mail.imageset/social_mail.png
  19. 23 0
      app/Assets.xcassets/Social/Phone.imageset/Contents.json
  20. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Phone.imageset/social_phone-1.png
  21. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Phone.imageset/social_phone-2.png
  22. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Phone.imageset/social_phone.png
  23. 23 0
      app/Assets.xcassets/Social/Twitter.imageset/Contents.json
  24. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Twitter.imageset/social_twitter-1.png
  25. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Twitter.imageset/social_twitter-2.png
  26. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Twitter.imageset/social_twitter.png
  27. 23 0
      app/Assets.xcassets/Social/Whatsapp.imageset/Contents.json
  28. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Whatsapp.imageset/social_whatsapp-1.png
  29. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Whatsapp.imageset/social_whatsapp-2.png
  30. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Whatsapp.imageset/social_whatsapp.png
  31. 23 0
      app/Assets.xcassets/Social/Youtube.imageset/Contents.json
  32. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Youtube.imageset/social_youtube-1.png
  33. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Youtube.imageset/social_youtube-2.png
  34. TEMPAT SAMPAH
      app/Assets.xcassets/Social/Youtube.imageset/social_youtube.png
  35. 154 4
      app/HomeView.swift
  36. 118 0
      app/RowHomeBlog.swift
  37. 111 0
      app/RowHomeBlog.xib
  38. 118 0
      app/RowHomeFutureActivities.swift
  39. 111 0
      app/RowHomeFutureActivities.xib
  40. 151 0
      app/RowHomeSocial.swift
  41. 155 0
      app/RowHomeSocial.xib

+ 24 - 0
app.xcodeproj/project.pbxproj

@@ -25,6 +25,12 @@
 		93B84BA21D9C31AB006C0F67 /* app.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 93B84BA01D9C31AB006C0F67 /* app.xcdatamodeld */; };
 		93B84BA41D9C31AB006C0F67 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 93B84BA31D9C31AB006C0F67 /* Assets.xcassets */; };
 		93B84BA71D9C31AB006C0F67 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 93B84BA51D9C31AB006C0F67 /* LaunchScreen.storyboard */; };
+		93BAD2EE1E585578009DF853 /* RowHomeBlog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93BAD2ED1E585578009DF853 /* RowHomeBlog.xib */; };
+		93BAD2F01E585662009DF853 /* RowHomeBlog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BAD2EF1E585662009DF853 /* RowHomeBlog.swift */; };
+		93BAD2F21E585E88009DF853 /* RowHomeFutureActivities.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93BAD2F11E585E88009DF853 /* RowHomeFutureActivities.xib */; };
+		93BAD2F41E585EE6009DF853 /* RowHomeFutureActivities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BAD2F31E585EE6009DF853 /* RowHomeFutureActivities.swift */; };
+		93BAD2F61E586310009DF853 /* RowHomeSocial.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93BAD2F51E586310009DF853 /* RowHomeSocial.xib */; };
+		93BAD2F81E586741009DF853 /* RowHomeSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BAD2F71E586741009DF853 /* RowHomeSocial.swift */; };
 		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 */; };
@@ -55,6 +61,12 @@
 		93B84BA31D9C31AB006C0F67 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		93B84BA61D9C31AB006C0F67 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		93B84BA81D9C31AB006C0F67 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		93BAD2ED1E585578009DF853 /* RowHomeBlog.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowHomeBlog.xib; sourceTree = "<group>"; };
+		93BAD2EF1E585662009DF853 /* RowHomeBlog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowHomeBlog.swift; sourceTree = "<group>"; };
+		93BAD2F11E585E88009DF853 /* RowHomeFutureActivities.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowHomeFutureActivities.xib; sourceTree = "<group>"; };
+		93BAD2F31E585EE6009DF853 /* RowHomeFutureActivities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowHomeFutureActivities.swift; sourceTree = "<group>"; };
+		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>"; };
 		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>"; };
@@ -114,6 +126,8 @@
 				93D9EA751DE3ACBB00089002 /* Sync.swift */,
 				931AA5AF1E219006003A2290 /* RowHomePastActivities.xib */,
 				93294FF91E337D0D00FDAF50 /* RowHomePastActivities.swift */,
+				93BAD2ED1E585578009DF853 /* RowHomeBlog.xib */,
+				93BAD2EF1E585662009DF853 /* RowHomeBlog.swift */,
 				931AA5881E1AFF8C003A2290 /* String.swift */,
 				93D9EA671DE342AC00089002 /* UIView.swift */,
 				935892CF1E493C2300E1CD5F /* UIImageView.swift */,
@@ -121,6 +135,10 @@
 				93075C6B1E59CB6B00396389 /* BlogView.swift */,
 				93075C6F1E59D04A00396389 /* RowBlog.swift */,
 				93075C711E59D06900396389 /* RowBlog.xib */,
+				93BAD2F11E585E88009DF853 /* RowHomeFutureActivities.xib */,
+				93BAD2F31E585EE6009DF853 /* RowHomeFutureActivities.swift */,
+				93BAD2F51E586310009DF853 /* RowHomeSocial.xib */,
+				93BAD2F71E586741009DF853 /* RowHomeSocial.swift */,
 			);
 			path = app;
 			sourceTree = "<group>";
@@ -197,10 +215,13 @@
 				931AA5AE1E218D0E003A2290 /* Entry.xib in Resources */,
 				93075C721E59D06900396389 /* RowBlog.xib in Resources */,
 				93B84BA71D9C31AB006C0F67 /* LaunchScreen.storyboard in Resources */,
+				93BAD2F61E586310009DF853 /* RowHomeSocial.xib in Resources */,
+				93BAD2F21E585E88009DF853 /* RowHomeFutureActivities.xib in Resources */,
 				931AA5B01E219006003A2290 /* RowHomePastActivities.xib in Resources */,
 				93D9EA601DE271E700089002 /* Section.xib in Resources */,
 				93075C6A1E59CAB000396389 /* BlogView.xib in Resources */,
 				93B84BA41D9C31AB006C0F67 /* Assets.xcassets in Resources */,
+				93BAD2EE1E585578009DF853 /* RowHomeBlog.xib in Resources */,
 				93B84B9F1D9C31AB006C0F67 /* Main.storyboard in Resources */,
 				93D9EA6C1DE3498500089002 /* HomeView.xib in Resources */,
 			);
@@ -216,9 +237,12 @@
 				93294FF81E336FA000FDAF50 /* Entry.swift in Sources */,
 				93D9EA641DE273FD00089002 /* Section.swift in Sources */,
 				93D9EA6A1DE3491100089002 /* HomeView.swift in Sources */,
+				93BAD2F81E586741009DF853 /* RowHomeSocial.swift in Sources */,
+				93BAD2F01E585662009DF853 /* RowHomeBlog.swift in Sources */,
 				93294FFA1E337D0D00FDAF50 /* RowHomePastActivities.swift in Sources */,
 				935892D01E493C2300E1CD5F /* UIImageView.swift in Sources */,
 				93D9EA761DE3ACBB00089002 /* Sync.swift in Sources */,
+				93BAD2F41E585EE6009DF853 /* RowHomeFutureActivities.swift in Sources */,
 				931AA5891E1AFF8C003A2290 /* String.swift in Sources */,
 				93B84B9C1D9C31AB006C0F67 /* ViewController.swift in Sources */,
 				93075C6C1E59CB6B00396389 /* BlogView.swift in Sources */,

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

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

+ 23 - 0
app/Assets.xcassets/Social/Facebook.imageset/Contents.json

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

TEMPAT SAMPAH
app/Assets.xcassets/Social/Facebook.imageset/social_facebook-1.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Facebook.imageset/social_facebook-2.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Facebook.imageset/social_facebook.png


+ 23 - 0
app/Assets.xcassets/Social/GooglePlus.imageset/Contents.json

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

TEMPAT SAMPAH
app/Assets.xcassets/Social/GooglePlus.imageset/social_googleplus-1.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/GooglePlus.imageset/social_googleplus-2.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/GooglePlus.imageset/social_googleplus.png


+ 23 - 0
app/Assets.xcassets/Social/Instagram.imageset/Contents.json

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

TEMPAT SAMPAH
app/Assets.xcassets/Social/Instagram.imageset/social_instagram-1.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Instagram.imageset/social_instagram-2.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Instagram.imageset/social_instagram.png


+ 23 - 0
app/Assets.xcassets/Social/Mail.imageset/Contents.json

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

TEMPAT SAMPAH
app/Assets.xcassets/Social/Mail.imageset/social_mail-1.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Mail.imageset/social_mail-2.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Mail.imageset/social_mail.png


+ 23 - 0
app/Assets.xcassets/Social/Phone.imageset/Contents.json

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

TEMPAT SAMPAH
app/Assets.xcassets/Social/Phone.imageset/social_phone-1.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Phone.imageset/social_phone-2.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Phone.imageset/social_phone.png


+ 23 - 0
app/Assets.xcassets/Social/Twitter.imageset/Contents.json

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

TEMPAT SAMPAH
app/Assets.xcassets/Social/Twitter.imageset/social_twitter-1.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Twitter.imageset/social_twitter-2.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Twitter.imageset/social_twitter.png


+ 23 - 0
app/Assets.xcassets/Social/Whatsapp.imageset/Contents.json

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

TEMPAT SAMPAH
app/Assets.xcassets/Social/Whatsapp.imageset/social_whatsapp-1.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Whatsapp.imageset/social_whatsapp-2.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Whatsapp.imageset/social_whatsapp.png


+ 23 - 0
app/Assets.xcassets/Social/Youtube.imageset/Contents.json

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

TEMPAT SAMPAH
app/Assets.xcassets/Social/Youtube.imageset/social_youtube-1.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Youtube.imageset/social_youtube-2.png


TEMPAT SAMPAH
app/Assets.xcassets/Social/Youtube.imageset/social_youtube.png


+ 154 - 4
app/HomeView.swift

@@ -70,11 +70,16 @@ class HomeView: UIView {
 		
 		//Get info to populate sections
 		let moc = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
+		
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
+		moc.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
 		let lang : String = getLanguage()
 		
 		//Populate sections
 		setUpPastActivities(context: moc, delegate: appDelegate, lang: lang, parent: pastActivitiesSection.getContentStack())
+		setUpBlog(context: moc, delegate: appDelegate, lang: lang, parent: blogSection.getContentStack())
+		setUpFutureActivities(context: moc, delegate: appDelegate, lang: lang, parent: futureActivitiesSection.getContentStack())
+		setUpSocial(parent: socialSection.getContentStack())
 		
 		
 		pastActivitiesSection.expandSection()
@@ -87,7 +92,7 @@ class HomeView: UIView {
 			print("curh: \(h)")
 		}
 		// TODO: Calculate at the end
-		self.scrollView.contentSize.height = 1200// CGFloat(h);
+		self.scrollView.contentSize.height = 1300// CGFloat(h);
 	}
 	
 	func getLanguage() -> String{
@@ -100,15 +105,151 @@ class HomeView: UIView {
 		}
 	}
 	
+	func setUpFutureActivities(context : NSManagedObjectContext, delegate: AppDelegate, lang: String, parent : UIStackView){
+		
+		//context.persistentStoreCoordinator = delegate.persistentStoreCoordinator
+		let fetchRequest: NSFetchRequest<Activity> = Activity.fetchRequest()
+		let sortDescriptor = NSSortDescriptor(key: "date", ascending: true)
+		let sortDescriptors = [sortDescriptor]
+		fetchRequest.sortDescriptors = sortDescriptors
+		fetchRequest.predicate = NSPredicate(format: "date > %@", NSDate())
+		fetchRequest.fetchLimit = 2
+		
+		do {
+			//go get the results
+			let searchResults = try context.fetch(fetchRequest)
+			
+			//I like to check the size of the returned results!
+			print ("Activities: \(searchResults.count)")
+			
+			var row : RowHomePastActivities
+			var count = 0
+			var id: Int
+			var title: String
+			var text: String
+			var image: String
+			
+			//You need to convert to NSManagedObject to use 'for' loops
+			for r in searchResults as [NSManagedObject] {
+				count = count + 1
+				//get the Key Value pairs (although there may be a better way to do that...
+				print("Perm: \(r.value(forKey: "permalink"))")
+				
+				
+				//Create a new row
+				row = RowHomePastActivities.init(s: "rowHomeFutureActivities\(count)", i: count)
+				id = r.value(forKey: "id")! as! Int
+				title = r.value(forKey: "title_\(lang)")! as! String
+				text = r.value(forKey: "text_\(lang)")! as! String
+				print(title)
+				row.setTitle(text: title)
+				row.setText(text: text)
+				
+				// 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
+						print ("IMAGE: \(image)")
+						row.setImage(filename: image)
+					}
+				} catch {
+					print("Error getting image for activity \(id): \(error)")
+				}
+				
+				print("Row height: \(row.frame.height)")
+				
+				parent.addArrangedSubview(row)
+				
+			}
+		} catch {
+			print("Error with request: \(error)")
+		}
+	}
+	
+	func setUpBlog(context : NSManagedObjectContext, delegate: AppDelegate, lang: String, parent : UIStackView){
+		
+		//context.persistentStoreCoordinator = delegate.persistentStoreCoordinator
+		let fetchRequest: NSFetchRequest<Post> = Post.fetchRequest()
+		let sortDescriptor = NSSortDescriptor(key: "dtime", ascending: false)
+		let sortDescriptors = [sortDescriptor]
+		fetchRequest.sortDescriptors = sortDescriptors
+		fetchRequest.fetchLimit = 2
+		
+		do {
+			//go get the results
+			let searchResults = try context.fetch(fetchRequest)
+			
+			//I like to check the size of the returned results!
+			print ("Post: \(searchResults.count)")
+			
+			var row : RowHomePastActivities
+			var count = 0
+			var id: Int
+			var title: String
+			var text: String
+			var image: String
+			
+			//You need to convert to NSManagedObject to use 'for' loops
+			for r in searchResults as [NSManagedObject] {
+				count = count + 1
+				//get the Key Value pairs (although there may be a better way to do that...
+				print("Perm: \(r.value(forKey: "permalink"))")
+				
+				
+				//Create a new row
+				row = RowHomePastActivities.init(s: "rowHomeBlog\(count)", i: count)
+				id = r.value(forKey: "id")! as! Int
+				title = r.value(forKey: "title_\(lang)")! as! String
+				text = r.value(forKey: "text_\(lang)")! as! String
+				print(title)
+				row.setTitle(text: title)
+				row.setText(text: text)
+				
+				// Get main image
+				image = ""
+				let imgFetchRequest: NSFetchRequest<Post_image> = Post_image.fetchRequest()
+				let imgSortDescriptor = NSSortDescriptor(key: "idx", ascending: true)
+				let imgSortDescriptors = [imgSortDescriptor]
+				imgFetchRequest.sortDescriptors = imgSortDescriptors
+				imgFetchRequest.predicate = NSPredicate(format: "post == %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
+						print ("IMAGE: \(image)")
+						row.setImage(filename: image)
+					}
+				} catch {
+					print("Error getting image for post \(id): \(error)")
+				}
+				
+				print("Row height: \(row.frame.height)")
+				
+				parent.addArrangedSubview(row)
+				
+			}
+		} catch {
+			print("Error with request: \(error)")
+		}
+	}
+	
 	func setUpPastActivities(context : NSManagedObjectContext, delegate: AppDelegate, lang: String, parent : UIStackView){
 		
-		context.persistentStoreCoordinator = delegate.persistentStoreCoordinator
+		//context.persistentStoreCoordinator = delegate.persistentStoreCoordinator
 		let fetchRequest: NSFetchRequest<Activity> = Activity.fetchRequest()
 		let sortDescriptor = NSSortDescriptor(key: "date", ascending: false)
 		let sortDescriptors = [sortDescriptor]
 		fetchRequest.sortDescriptors = sortDescriptors
-		//TODO Compare dates
-		//fetchRequest.predicate = NSPredicate(format: "date < %@", sysdate)
+		fetchRequest.predicate = NSPredicate(format: "date <= %@", NSDate())
 		fetchRequest.fetchLimit = 2
 		
 		do {
@@ -169,4 +310,13 @@ class HomeView: UIView {
 			print("Error with request: \(error)")
 		}
 	}
+	
+	func setUpSocial(parent : UIStackView){
+		print("SETING UP SOCIAL")
+		//Create a new row
+		var row : RowHomeSocial
+		row = RowHomeSocial.init(s: "rowHomeSocial", i: 0)
+		print("ROW CREATED")
+		parent.addArrangedSubview(row)
+	}
 }

+ 118 - 0
app/RowHomeBlog.swift

@@ -0,0 +1,118 @@
+// Copyright (C) 2016 Inigo Valentin
+//
+// This file is part of the Gasteizko Margolariak IOS app.
+//
+// The Gasteizko Margolariak IOS app is free software: you can
+// redistribute it and/or modify it under the terms of the
+// GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your
+// option) any later version.
+//
+// The Gasteizko Margolariak IOS app is distributed in the
+// hope that it will be useful, but WITHOUT ANY WARRANTY;
+// without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+// Public License for more details.
+//
+// You should have received a copy of the GNU General Public
+// License along with the Gasteizko Margolariak IOS app.
+// If not, see <http://www.gnu.org/licenses/>.
+
+import Foundation
+import UIKit
+
+/**
+Extension of UIView to be formatted as sections.
+*/
+@IBDesignable class RowHomeBlog: UIView {
+	
+	//This view
+	var v: UIView!
+	
+	//The container.
+	@IBOutlet weak var container: UIView!
+	
+	//The entry
+	@IBOutlet weak var entry: UIView!
+	
+	//The post title.
+	@IBOutlet weak var title: UILabel!
+	
+	//The post text.
+	@IBOutlet weak var descrip: UILabel!
+	
+	//The image.
+	@IBOutlet weak var image: UIImageView!
+	
+	/**
+	Default constructor
+	*/
+	required init?(coder aDecoder: NSCoder) {
+		super.init(coder: aDecoder)
+	}
+	
+	private func loadViewFromNib() {
+		let bundle = Bundle(for: type(of: self))
+		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
+		nib.instantiate(withOwner: self, options: nil).first as! UIView
+	}
+	
+	/**
+	Default constructor.
+	:param: s Custom identifier
+	:param: i Custom identifier
+	*/
+	init(s: String, i: Int) {
+		super.init(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
+		loadViewFromNib()
+		v = self
+		v.frame = bounds
+		v.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		v.translatesAutoresizingMaskIntoConstraints = true
+		container.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		container.translatesAutoresizingMaskIntoConstraints = true
+		
+		container.frame = v.bounds
+		v.addSubview(container)
+	}
+	
+	/**
+	Default constructor for the interface builder
+	*/
+	override init(frame: CGRect){
+		super.init(frame: frame)
+	}
+	
+	/**
+	Changes the title of the post. Decodes HTML.
+	:param: text The new title.
+	*/
+	func setTitle(text: String){
+		title.text = text.stripHtml()
+	}
+	
+	/**
+	Changes the text of the text. Decodes HTML.
+	:param: text The new text.
+	*/
+	func setText(text: String){
+		descrip.text = text.stripHtml()
+	}
+	
+	/**
+	Changes the image of the activity.
+	If null or empty, the igage is hidden.
+	:param: path The new text.
+	*/
+	func setImage(filename: String){
+		if (filename == ""){
+			print("No image")
+			//TODO hide the imageview
+		}
+		else{
+			print("Set image \(filename)")
+			let path = "img/blog/thumb/\(filename)"
+			image.setImage(localPath: path, remotePath: "https://margolariak.com/\(path)")
+		}
+	}
+}

+ 111 - 0
app/RowHomeBlog.xib

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16B2657" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<device id="retina4_7" orientation="portrait">
+<adaptation id="fullscreen"/>
+</device>
+<dependencies>
+<deployment identifier="iOS"/>
+<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
+<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+</dependencies>
+<objects>
+<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="RowHomeBlog" customModule="app">
+<connections>
+<outlet property="container" destination="2hI-rc-KPm" id="rWX-Vl-kOp"/>
+<outlet property="descrip" destination="f4E-5p-Bid" id="IF5-ck-qUL"/>
+<outlet property="entry" destination="wLM-VU-VYk" id="Gkq-yE-fdN"/>
+<outlet property="image" destination="WSe-uz-Uhz" id="iU4-jm-UzQ"/>
+<outlet property="title" destination="Bkz-DV-HVr" id="1ok-yI-Npt"/>
+</connections>
+</placeholder>
+<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+<view contentMode="scaleToFill" id="iN0-l3-epB" userLabel="RowHomePastActivities" customClass="RowHomePastActivities" customModule="app">
+<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="2hI-rc-KPm" userLabel="Container">
+<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+<subviews>
+<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wLM-VU-VYk" userLabel="Entry">
+<rect key="frame" x="10" y="10" width="355" height="667"/>
+<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="Bkz-DV-HVr" userLabel="Title">
+<rect key="frame" x="10" y="10" width="335" height="21.5"/>
+<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+<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="WSe-uz-Uhz" userLabel="Image">
+<rect key="frame" x="10" y="40" width="89" height="64"/>
+<constraints>
+<constraint firstAttribute="height" constant="64" id="EJ3-uo-Xp3"/>
+</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="f4E-5p-Bid" userLabel="Text">
+<rect key="frame" x="98" y="40" width="214" height="64"/>
+<fontDescription key="fontDescription" type="system" pointSize="17"/>
+<nil key="textColor"/>
+<nil key="highlightedColor"/>
+</label>
+</subviews>
+<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+<constraints>
+<constraint firstItem="WSe-uz-Uhz" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.2" id="9Lz-WQ-1aS"/>
+<constraint firstItem="f4E-5p-Bid" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="40" id="Emi-Ob-27Q"/>
+<constraint firstItem="Bkz-DV-HVr" firstAttribute="leading" secondItem="wLM-VU-VYk" secondAttribute="leading" constant="10" id="LSz-FM-x2V"/>
+<constraint firstItem="f4E-5p-Bid" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.7" id="MdM-ps-4b8"/>
+<constraint firstAttribute="trailing" secondItem="Bkz-DV-HVr" secondAttribute="trailing" constant="10" id="MdM-yF-pmK"/>
+<constraint firstItem="WSe-uz-Uhz" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="40" id="Pyf-oT-PQl"/>
+<constraint firstItem="WSe-uz-Uhz" firstAttribute="leading" secondItem="wLM-VU-VYk" secondAttribute="leading" constant="10" id="YG6-eX-oTj"/>
+<constraint firstItem="Bkz-DV-HVr" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="10" id="mwG-d2-HQL"/>
+<constraint firstAttribute="trailing" secondItem="f4E-5p-Bid" secondAttribute="trailing" constant="10" id="svU-xx-LsR"/>
+</constraints>
+<edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
+<userDefinedRuntimeAttributes>
+<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+<color key="value" red="0.42745098039215684" green="0.41176470588235292" blue="0.56470588235294117" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+</userDefinedRuntimeAttribute>
+<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+<real key="value" value="1"/>
+</userDefinedRuntimeAttribute>
+<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+<real key="value" value="3"/>
+</userDefinedRuntimeAttribute>
+</userDefinedRuntimeAttributes>
+</view>
+</subviews>
+<constraints>
+<constraint firstItem="wLM-VU-VYk" firstAttribute="bottom" secondItem="2hI-rc-KPm" secondAttribute="bottom" constant="10" id="39K-W7-EIE"/>
+<constraint firstAttribute="trailing" secondItem="wLM-VU-VYk" secondAttribute="trailing" constant="10" id="HSF-55-R5c"/>
+<constraint firstAttribute="height" constant="120" id="PdT-5v-I0r"/>
+<constraint firstItem="wLM-VU-VYk" firstAttribute="top" secondItem="2hI-rc-KPm" secondAttribute="top" constant="10" id="fWN-oO-QzS"/>
+<constraint firstItem="wLM-VU-VYk" firstAttribute="leading" secondItem="2hI-rc-KPm" secondAttribute="leading" constant="10" id="teN-oh-Db9"/>
+</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>
+<constraints>
+<constraint firstItem="2hI-rc-KPm" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" id="Kwy-25-YES"/>
+<constraint firstItem="2hI-rc-KPm" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="clR-QU-zlD"/>
+<constraint firstItem="2hI-rc-KPm" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="htS-q0-otF"/>
+<constraint firstItem="2hI-rc-KPm" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="rig-k7-6bz"/>
+</constraints>
+<nil key="simulatedStatusBarMetrics"/>
+<userDefinedRuntimeAttributes>
+<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+<real key="value" value="0.0"/>
+</userDefinedRuntimeAttribute>
+</userDefinedRuntimeAttributes>
+<point key="canvasLocation" x="45.5" y="-43.5"/>
+</view>
+</objects>
+<resources>
+<image name="PhotoPlaceholder" width="170" height="108"/>
+</resources>
+</document>

+ 118 - 0
app/RowHomeFutureActivities.swift

@@ -0,0 +1,118 @@
+// Copyright (C) 2016 Inigo Valentin
+//
+// This file is part of the Gasteizko Margolariak IOS app.
+//
+// The Gasteizko Margolariak IOS app is free software: you can
+// redistribute it and/or modify it under the terms of the
+// GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your
+// option) any later version.
+//
+// The Gasteizko Margolariak IOS app is distributed in the
+// hope that it will be useful, but WITHOUT ANY WARRANTY;
+// without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+// Public License for more details.
+//
+// You should have received a copy of the GNU General Public
+// License along with the Gasteizko Margolariak IOS app.
+// If not, see <http://www.gnu.org/licenses/>.
+
+import Foundation
+import UIKit
+
+/**
+Extension of UIView to be formatted as sections.
+*/
+@IBDesignable class RowHomeFutureActivities: UIView {
+	
+	//This view
+	var v: UIView!
+	
+	//The container.
+	@IBOutlet weak var container: UIView!
+	
+	//The entry
+	@IBOutlet weak var entry: UIView!
+	
+	//The activity title.
+	@IBOutlet weak var title: UILabel!
+	
+	//The activity description.
+	@IBOutlet weak var descrip: UILabel!
+	
+	//The activity image.
+	@IBOutlet weak var image: UIImageView!
+	
+	/**
+	Default constructor
+	*/
+	required init?(coder aDecoder: NSCoder) {
+		super.init(coder: aDecoder)
+	}
+	
+	private func loadViewFromNib() {
+		let bundle = Bundle(for: type(of: self))
+		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
+		nib.instantiate(withOwner: self, options: nil).first as! UIView
+	}
+	
+	/**
+	Default constructor.
+	:param: s Custom identifier
+	:param: i Custom identifier
+	*/
+	init(s: String, i: Int) {
+		super.init(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
+		loadViewFromNib()
+		v = self
+		v.frame = bounds
+		v.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		v.translatesAutoresizingMaskIntoConstraints = true
+		container.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		container.translatesAutoresizingMaskIntoConstraints = true
+		
+		container.frame = v.bounds
+		v.addSubview(container)
+	}
+	
+	/**
+	Default constructor for the interface builder
+	*/
+	override init(frame: CGRect){
+		super.init(frame: frame)
+	}
+	
+	/**
+	Changes the title of the activity. Decodes HTML.
+	:param: text The new title.
+	*/
+	func setTitle(text: String){
+		title.text = text.stripHtml()
+	}
+	
+	/**
+	Changes the description of the activity. Decodes HTML.
+	:param: text The new text.
+	*/
+	func setText(text: String){
+		descrip.text = text.stripHtml()
+	}
+	
+	/**
+	Changes the image of the activity.
+	If null or empty, the igage is hidden.
+	:param: path The new text.
+	*/
+	func setImage(filename: String){
+		if (filename == ""){
+			print("No image")
+			//TODO hide the imageview
+		}
+		else{
+			print("Set image \(filename)")
+			let path = "img/actividades/thumb/\(filename)"
+			image.setImage(localPath: path, remotePath: "https://margolariak.com/\(path)")
+		}
+	}
+}

+ 111 - 0
app/RowHomeFutureActivities.xib

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16B2657" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<device id="retina4_7" orientation="portrait">
+<adaptation id="fullscreen"/>
+</device>
+<dependencies>
+<deployment identifier="iOS"/>
+<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
+<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+</dependencies>
+<objects>
+<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="RowHomeFutureActivities" customModule="app">
+<connections>
+<outlet property="container" destination="2hI-rc-KPm" id="rWX-Vl-kOp"/>
+<outlet property="descrip" destination="f4E-5p-Bid" id="IF5-ck-qUL"/>
+<outlet property="entry" destination="wLM-VU-VYk" id="Gkq-yE-fdN"/>
+<outlet property="image" destination="WSe-uz-Uhz" id="iU4-jm-UzQ"/>
+<outlet property="title" destination="Bkz-DV-HVr" id="1ok-yI-Npt"/>
+</connections>
+</placeholder>
+<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+<view contentMode="scaleToFill" id="iN0-l3-epB" userLabel="RowHomePastActivities" customClass="RowHomePastActivities" customModule="app">
+<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="2hI-rc-KPm" userLabel="Container">
+<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+<subviews>
+<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wLM-VU-VYk" userLabel="Entry">
+<rect key="frame" x="10" y="10" width="355" height="667"/>
+<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="Bkz-DV-HVr" userLabel="Title">
+<rect key="frame" x="10" y="10" width="335" height="21.5"/>
+<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+<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="WSe-uz-Uhz" userLabel="Image">
+<rect key="frame" x="10" y="40" width="89" height="64"/>
+<constraints>
+<constraint firstAttribute="height" constant="64" id="EJ3-uo-Xp3"/>
+</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="f4E-5p-Bid" userLabel="Text">
+<rect key="frame" x="98" y="40" width="214" height="64"/>
+<fontDescription key="fontDescription" type="system" pointSize="17"/>
+<nil key="textColor"/>
+<nil key="highlightedColor"/>
+</label>
+</subviews>
+<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+<constraints>
+<constraint firstItem="WSe-uz-Uhz" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.2" id="9Lz-WQ-1aS"/>
+<constraint firstItem="f4E-5p-Bid" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="40" id="Emi-Ob-27Q"/>
+<constraint firstItem="Bkz-DV-HVr" firstAttribute="leading" secondItem="wLM-VU-VYk" secondAttribute="leading" constant="10" id="LSz-FM-x2V"/>
+<constraint firstItem="f4E-5p-Bid" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.7" id="MdM-ps-4b8"/>
+<constraint firstAttribute="trailing" secondItem="Bkz-DV-HVr" secondAttribute="trailing" constant="10" id="MdM-yF-pmK"/>
+<constraint firstItem="WSe-uz-Uhz" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="40" id="Pyf-oT-PQl"/>
+<constraint firstItem="WSe-uz-Uhz" firstAttribute="leading" secondItem="wLM-VU-VYk" secondAttribute="leading" constant="10" id="YG6-eX-oTj"/>
+<constraint firstItem="Bkz-DV-HVr" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" constant="10" id="mwG-d2-HQL"/>
+<constraint firstAttribute="trailing" secondItem="f4E-5p-Bid" secondAttribute="trailing" constant="10" id="svU-xx-LsR"/>
+</constraints>
+<edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
+<userDefinedRuntimeAttributes>
+<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+<color key="value" red="0.42745098039215684" green="0.41176470588235292" blue="0.56470588235294117" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+</userDefinedRuntimeAttribute>
+<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+<real key="value" value="1"/>
+</userDefinedRuntimeAttribute>
+<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+<real key="value" value="3"/>
+</userDefinedRuntimeAttribute>
+</userDefinedRuntimeAttributes>
+</view>
+</subviews>
+<constraints>
+<constraint firstItem="wLM-VU-VYk" firstAttribute="bottom" secondItem="2hI-rc-KPm" secondAttribute="bottom" constant="10" id="39K-W7-EIE"/>
+<constraint firstAttribute="trailing" secondItem="wLM-VU-VYk" secondAttribute="trailing" constant="10" id="HSF-55-R5c"/>
+<constraint firstAttribute="height" constant="120" id="PdT-5v-I0r"/>
+<constraint firstItem="wLM-VU-VYk" firstAttribute="top" secondItem="2hI-rc-KPm" secondAttribute="top" constant="10" id="fWN-oO-QzS"/>
+<constraint firstItem="wLM-VU-VYk" firstAttribute="leading" secondItem="2hI-rc-KPm" secondAttribute="leading" constant="10" id="teN-oh-Db9"/>
+</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>
+<constraints>
+<constraint firstItem="2hI-rc-KPm" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" id="Kwy-25-YES"/>
+<constraint firstItem="2hI-rc-KPm" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="clR-QU-zlD"/>
+<constraint firstItem="2hI-rc-KPm" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="htS-q0-otF"/>
+<constraint firstItem="2hI-rc-KPm" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="rig-k7-6bz"/>
+</constraints>
+<nil key="simulatedStatusBarMetrics"/>
+<userDefinedRuntimeAttributes>
+<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+<real key="value" value="0.0"/>
+</userDefinedRuntimeAttribute>
+</userDefinedRuntimeAttributes>
+<point key="canvasLocation" x="45.5" y="-43.5"/>
+</view>
+</objects>
+<resources>
+<image name="PhotoPlaceholder" width="170" height="108"/>
+</resources>
+</document>

+ 151 - 0
app/RowHomeSocial.swift

@@ -0,0 +1,151 @@
+// Copyright (C) 2016 Inigo Valentin
+//
+// This file is part of the Gasteizko Margolariak IOS app.
+//
+// The Gasteizko Margolariak IOS app is free software: you can
+// redistribute it and/or modify it under the terms of the
+// GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your
+// option) any later version.
+//
+// The Gasteizko Margolariak IOS app is distributed in the
+// hope that it will be useful, but WITHOUT ANY WARRANTY;
+// without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+// Public License for more details.
+//
+// You should have received a copy of the GNU General Public
+// License along with the Gasteizko Margolariak IOS app.
+// If not, see <http://www.gnu.org/licenses/>.
+
+import Foundation
+import UIKit
+
+/**
+Extension of UIView to be formatted as sections.
+*/
+@IBDesignable class RowHomeSocial: UIView {
+	
+	//This view
+	var v: UIView!
+	
+	//The container.
+	@IBOutlet weak var container: UIView!
+	
+	//The container.
+	@IBOutlet weak var entry: UIView!
+	
+	//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!
+	@IBOutlet weak var btnYoutube: UIImageView!
+	@IBOutlet weak var btnInstagram: UIImageView!
+	
+	/**
+	Default constructor
+	*/
+	required init?(coder aDecoder: NSCoder) {
+		super.init(coder: aDecoder)
+	}
+	
+	private func loadViewFromNib() {
+		print("LOADING NIB...")
+		let bundle = Bundle(for: type(of: self))
+		print("GOT BUNDLE...")
+		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
+		print("NIB CREATED")
+		nib.instantiate(withOwner: self, options: nil).first as! UIView
+		print("NIB INSTANTIATED")
+	}
+	
+	/**
+	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()
+		v = self
+		v.frame = bounds
+		v.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		v.translatesAutoresizingMaskIntoConstraints = true
+		container.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		container.translatesAutoresizingMaskIntoConstraints = true
+		
+		container.frame = v.bounds
+		v.addSubview(container)
+		
+		// Set buttons up
+		let phoneTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapPhone))
+		btnPhone.isUserInteractionEnabled = true
+		btnPhone.addGestureRecognizer(phoneTapRecognizer)
+		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)
+		let twitterTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapTwitter))
+		btnTwitter.isUserInteractionEnabled = true
+		btnTwitter.addGestureRecognizer(twitterTapRecognizer)
+		let googleTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapGoogle))
+		btnGoogle.isUserInteractionEnabled = true
+		btnGoogle.addGestureRecognizer(googleTapRecognizer)
+		let youtubeTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapYoutube))
+		btnYoutube.isUserInteractionEnabled = true
+		btnYoutube.addGestureRecognizer(youtubeTapRecognizer)
+		let instagramTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapInstagram))
+		btnInstagram.isUserInteractionEnabled = true
+		btnInstagram.addGestureRecognizer(instagramTapRecognizer)
+	}
+	
+	/**
+	Default constructor for the interface builder
+	*/
+	override init(frame: CGRect){
+		super.init(frame: frame)
+	}
+	
+	func didTapPhone() {
+		UIApplication.shared.openURL(NSURL(string: "tel://+34637140371") as! URL)
+	}
+	
+	func didTapMail() {
+		UIApplication.shared.openURL(NSURL(string: "mailto:gasteizkomargolariak@gmail.com") as! URL)
+	}
+	
+	func didTapWhatsapp() {
+		//As of today, imposible
+		//UIApplication.shared.openURL(NSURL(string: "+34637140371") as! URL)
+	}
+	
+	func didTapFacebook() {
+		UIApplication.shared.openURL(NSURL(string: "http://facebook.com/gmargolariak") as! URL)
+	}
+	
+	func didTapTwitter() {
+		UIApplication.shared.openURL(NSURL(string: "http://twitter.com/gmargolariak") as! URL)
+	}
+	
+	func didTapGoogle() {
+		UIApplication.shared.openURL(NSURL(string: "https://plus.google.com/106661466029005469492") as! URL)
+	}
+	
+	func didTapYoutube() {
+		UIApplication.shared.openURL(NSURL(string: "https://www.youtube.com/user/GasteizkoMargolariak") as! URL)
+	}
+	
+	func didTapInstagram() {
+		UIApplication.shared.openURL(NSURL(string: "https://instagram.com/gmargolariak/") as! URL)
+	}
+	
+	
+}

+ 155 - 0
app/RowHomeSocial.xib

@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16B2657" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <capability name="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"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="RowHomeSocial" customModule="app">
+            <connections>
+                <outlet property="btnFacebook" destination="wP8-1o-Rrh" id="6uv-pC-Nta"/>
+                <outlet property="btnGoogle" destination="L4k-eK-pkc" id="DCM-a0-yah"/>
+                <outlet property="btnInstagram" destination="OlS-ga-Ngl" id="egF-6B-SQd"/>
+                <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"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" userLabel="RowHomeSocial" customClass="RowHomeSocial" customModule="app">
+            <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="2hI-rc-KPm" userLabel="Container">
+                    <rect key="frame" x="0.0" y="0.0" width="375" height="177.5"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wLM-VU-VYk" userLabel="Entry">
+                            <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="0.0" y="0.0" width="89.5" height="89.5"/>
+                                </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="89.5" y="0.0" width="89" height="89.5"/>
+                                    <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="179" y="0.0" width="89" height="89"/>
+                                    <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="268" y="0.0" width="89" height="89"/>
+                                    <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="0.0" y="90" width="89.5" height="89.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="90" y="90" width="89.5" height="89.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="179" y="89" width="89.5" height="89.5"/>
+                                </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="268" y="89" width="89.5" height="89.5"/>
+                                </imageView>
+                            </subviews>
+                            <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstItem="Ttk-Ce-1XP" firstAttribute="width" secondItem="512-B2-6nt" secondAttribute="width" id="0QX-sh-Y62"/>
+                                <constraint firstItem="Ttk-Ce-1XP" firstAttribute="height" secondItem="512-B2-6nt" secondAttribute="height" id="39L-QV-csw"/>
+                                <constraint firstItem="wP8-1o-Rrh" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" id="3xb-00-2P6"/>
+                                <constraint firstItem="5Xa-Sh-XrB" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" id="7T1-Hk-R35"/>
+                                <constraint firstItem="Ttk-Ce-1XP" firstAttribute="top" secondItem="512-B2-6nt" secondAttribute="bottom" id="9F0-DU-FFO"/>
+                                <constraint firstItem="0jq-K4-utG" firstAttribute="leading" secondItem="5Xa-Sh-XrB" secondAttribute="trailing" 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" id="IM6-dv-FSu"/>
+                                <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" id="Jf9-UI-kn3"/>
+                                <constraint firstItem="L4k-eK-pkc" firstAttribute="leading" secondItem="5Xa-Sh-XrB" secondAttribute="leading" id="Lkg-Ff-jNA"/>
+                                <constraint firstItem="wP8-1o-Rrh" firstAttribute="height" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" id="Lyv-es-d3j"/>
+                                <constraint firstItem="512-B2-6nt" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" id="MYA-FO-b5k"/>
+                                <constraint firstItem="1qd-jG-4Bn" firstAttribute="top" secondItem="0jq-K4-utG" secondAttribute="bottom" id="QMP-Gi-WCw"/>
+                                <constraint firstItem="0jq-K4-utG" firstAttribute="height" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" id="RPd-iR-02y"/>
+                                <constraint firstItem="512-B2-6nt" firstAttribute="height" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" id="Z1m-CY-xaF"/>
+                                <constraint firstItem="5Xa-Sh-XrB" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" 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" 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="wP8-1o-Rrh" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" id="gjG-xf-f2v"/>
+                                <constraint firstItem="5Xa-Sh-XrB" firstAttribute="leading" secondItem="512-B2-6nt" secondAttribute="trailing" 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" id="lyN-c0-DOH"/>
+                                <constraint firstItem="0jq-K4-utG" firstAttribute="top" secondItem="wLM-VU-VYk" secondAttribute="top" id="nUV-gk-zhw"/>
+                                <constraint firstItem="0jq-K4-utG" firstAttribute="width" secondItem="wLM-VU-VYk" secondAttribute="width" multiplier="0.25" id="uCp-Vv-c61"/>
+                                <constraint firstItem="OlS-ga-Ngl" firstAttribute="top" secondItem="wP8-1o-Rrh" secondAttribute="bottom" id="vCU-hL-wuO"/>
+                                <constraint firstItem="512-B2-6nt" firstAttribute="leading" secondItem="wLM-VU-VYk" secondAttribute="leading" id="wMJ-K2-1e9"/>
+                                <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"/>
+                            </constraints>
+                            <edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                    <color key="value" red="0.42745098039215684" green="0.41176470588235292" blue="0.56470588235294117" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                    <real key="value" value="1"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="3"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </view>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="wLM-VU-VYk" firstAttribute="bottom" secondItem="2hI-rc-KPm" secondAttribute="bottom" constant="10" id="39K-W7-EIE"/>
+                        <constraint firstAttribute="trailing" secondItem="wLM-VU-VYk" secondAttribute="trailing" constant="10" id="HSF-55-R5c"/>
+                        <constraint firstItem="wLM-VU-VYk" firstAttribute="top" secondItem="2hI-rc-KPm" secondAttribute="top" constant="10" id="fWN-oO-QzS"/>
+                        <constraint firstItem="wLM-VU-VYk" firstAttribute="leading" secondItem="2hI-rc-KPm" secondAttribute="leading" constant="10" id="teN-oh-Db9"/>
+                    </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>
+            <constraints>
+                <constraint firstItem="2hI-rc-KPm" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="cYi-xQ-QXA"/>
+                <constraint firstItem="2hI-rc-KPm" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="clR-QU-zlD"/>
+                <constraint firstItem="2hI-rc-KPm" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="rig-k7-6bz"/>
+            </constraints>
+            <nil key="simulatedStatusBarMetrics"/>
+            <userDefinedRuntimeAttributes>
+                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                    <real key="value" value="0.0"/>
+                </userDefinedRuntimeAttribute>
+            </userDefinedRuntimeAttributes>
+            <point key="canvasLocation" x="-36.5" y="-43.5"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="Facebook" width="105" height="105"/>
+        <image name="GooglePlus" width="105" height="105"/>
+        <image name="Instagram" width="105" height="105"/>
+        <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>