Quellcode durchsuchen

Post view loaded from home screen.

Iñigo Valentin vor 9 Jahren
Ursprung
Commit
30e74e5ca6
6 geänderte Dateien mit 54 neuen und 31 gelöschten Zeilen
  1. 15 4
      app/Base.lproj/Main.storyboard
  2. 7 7
      app/BlogView.swift
  3. 1 1
      app/BlogView.xib
  4. 11 7
      app/PostView.swift
  5. 3 12
      app/PostView.xib
  6. 17 0
      app/ViewController.swift

+ 15 - 4
app/Base.lproj/Main.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16B2657" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
     <device id="retina4_0" orientation="portrait">
     <device id="retina4_0" orientation="portrait">
         <adaptation id="fullscreen"/>
         <adaptation id="fullscreen"/>
     </device>
     </device>
@@ -142,9 +142,16 @@
                                     <segue destination="Bxe-vP-zrv" kind="embed" id="ufh-fQ-2yF"/>
                                     <segue destination="Bxe-vP-zrv" kind="embed" id="ufh-fQ-2yF"/>
                                 </connections>
                                 </connections>
                             </containerView>
                             </containerView>
+                            <containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mlD-LQ-7rk" userLabel="Container View Post">
+                                <rect key="frame" x="0.0" y="110" width="320" height="458"/>
+                                <connections>
+                                    <segue destination="UkS-wI-Yhx" kind="embed" id="Ye2-qm-gxO"/>
+                                </connections>
+                            </containerView>
                         </subviews>
                         </subviews>
                         <color key="backgroundColor" red="0.0" green="0.47058823529411764" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <color key="backgroundColor" red="0.0" green="0.47058823529411764" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
                         <constraints>
+                            <constraint firstItem="mlD-LQ-7rk" firstAttribute="top" secondItem="Ikv-46-g2m" secondAttribute="bottom" id="0pt-jc-DqH"/>
                             <constraint firstItem="p8H-ai-kTU" firstAttribute="top" secondItem="Ikv-46-g2m" secondAttribute="bottom" id="1fj-8m-lWP"/>
                             <constraint firstItem="p8H-ai-kTU" firstAttribute="top" secondItem="Ikv-46-g2m" secondAttribute="bottom" id="1fj-8m-lWP"/>
                             <constraint firstItem="T4H-Rn-I4y" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="3Eh-im-76c"/>
                             <constraint firstItem="T4H-Rn-I4y" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="3Eh-im-76c"/>
                             <constraint firstItem="p8H-ai-kTU" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="3z5-Bs-qVY"/>
                             <constraint firstItem="p8H-ai-kTU" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="3z5-Bs-qVY"/>
@@ -167,13 +174,16 @@
                             <constraint firstItem="T5i-d0-9I1" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="ZQY-pp-rDk"/>
                             <constraint firstItem="T5i-d0-9I1" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="ZQY-pp-rDk"/>
                             <constraint firstItem="nhy-Gy-cgq" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="ZjH-ke-Gtv"/>
                             <constraint firstItem="nhy-Gy-cgq" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="ZjH-ke-Gtv"/>
                             <constraint firstItem="T4H-Rn-I4y" firstAttribute="centerX" secondItem="Ikv-46-g2m" secondAttribute="centerX" id="a3W-7J-vjF"/>
                             <constraint firstItem="T4H-Rn-I4y" firstAttribute="centerX" secondItem="Ikv-46-g2m" secondAttribute="centerX" id="a3W-7J-vjF"/>
+                            <constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="mlD-LQ-7rk" secondAttribute="bottom" id="aRg-2c-Jny"/>
                             <constraint firstItem="nhy-Gy-cgq" firstAttribute="top" secondItem="Ikv-46-g2m" secondAttribute="bottom" id="dey-LW-WUE"/>
                             <constraint firstItem="nhy-Gy-cgq" firstAttribute="top" secondItem="Ikv-46-g2m" secondAttribute="bottom" id="dey-LW-WUE"/>
                             <constraint firstItem="3r9-W6-dmf" firstAttribute="centerX" secondItem="Ikv-46-g2m" secondAttribute="centerX" id="efu-E3-cv8"/>
                             <constraint firstItem="3r9-W6-dmf" firstAttribute="centerX" secondItem="Ikv-46-g2m" secondAttribute="centerX" id="efu-E3-cv8"/>
                             <constraint firstItem="Ikv-46-g2m" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="eln-ck-QcI"/>
                             <constraint firstItem="Ikv-46-g2m" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="eln-ck-QcI"/>
                             <constraint firstItem="FfD-xR-Ufj" firstAttribute="top" secondItem="Ikv-46-g2m" secondAttribute="bottom" id="fwz-Vq-Hzc"/>
                             <constraint firstItem="FfD-xR-Ufj" firstAttribute="top" secondItem="Ikv-46-g2m" secondAttribute="bottom" id="fwz-Vq-Hzc"/>
+                            <constraint firstItem="mlD-LQ-7rk" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="hjx-EG-jOT"/>
                             <constraint firstItem="Ikv-46-g2m" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="j8o-dm-xpa"/>
                             <constraint firstItem="Ikv-46-g2m" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="j8o-dm-xpa"/>
                             <constraint firstItem="FfD-xR-Ufj" firstAttribute="centerX" secondItem="Ikv-46-g2m" secondAttribute="centerX" id="kSp-hr-GIX"/>
                             <constraint firstItem="FfD-xR-Ufj" firstAttribute="centerX" secondItem="Ikv-46-g2m" secondAttribute="centerX" id="kSp-hr-GIX"/>
                             <constraint firstItem="T5i-d0-9I1" firstAttribute="centerX" secondItem="Ikv-46-g2m" secondAttribute="centerX" id="psj-oK-zVR"/>
                             <constraint firstItem="T5i-d0-9I1" firstAttribute="centerX" secondItem="Ikv-46-g2m" secondAttribute="centerX" id="psj-oK-zVR"/>
+                            <constraint firstItem="mlD-LQ-7rk" firstAttribute="centerX" secondItem="Ikv-46-g2m" secondAttribute="centerX" id="u90-c1-7kN"/>
                             <constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="T4H-Rn-I4y" secondAttribute="bottom" id="vQE-x2-yf6"/>
                             <constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="T4H-Rn-I4y" secondAttribute="bottom" id="vQE-x2-yf6"/>
                         </constraints>
                         </constraints>
                     </view>
                     </view>
@@ -184,6 +194,7 @@
                         <outlet property="containerViewHome" destination="FfD-xR-Ufj" id="EtF-qz-vWE"/>
                         <outlet property="containerViewHome" destination="FfD-xR-Ufj" id="EtF-qz-vWE"/>
                         <outlet property="containerViewLablanca" destination="nhy-Gy-cgq" id="bBa-2W-hjf"/>
                         <outlet property="containerViewLablanca" destination="nhy-Gy-cgq" id="bBa-2W-hjf"/>
                         <outlet property="containerViewLocation" destination="T4H-Rn-I4y" id="EFa-Km-WuR"/>
                         <outlet property="containerViewLocation" destination="T4H-Rn-I4y" id="EFa-Km-WuR"/>
+                        <outlet property="containerViewPost" destination="mlD-LQ-7rk" id="vBh-WX-EhR"/>
                     </connections>
                     </connections>
                 </viewController>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
@@ -306,10 +317,10 @@
                         <viewControllerLayoutGuide type="top" id="yy6-d2-MRo"/>
                         <viewControllerLayoutGuide type="top" id="yy6-d2-MRo"/>
                         <viewControllerLayoutGuide type="bottom" id="IxZ-up-5UO"/>
                         <viewControllerLayoutGuide type="bottom" id="IxZ-up-5UO"/>
                     </layoutGuides>
                     </layoutGuides>
-                    <view key="view" contentMode="scaleToFill" id="zcp-qV-FPt">
-                        <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <view key="view" contentMode="scaleToFill" id="zcp-qV-FPt" customClass="PostView" customModule="app">
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="458"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <color key="backgroundColor" red="0.70980392156862748" green="0.82745098039215681" blue="0.89803921568627454" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
                     </view>
                 </viewController>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="r4n-Sk-nt4" userLabel="First Responder" sceneMemberID="firstResponder"/>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="r4n-Sk-nt4" userLabel="First Responder" sceneMemberID="firstResponder"/>

+ 7 - 7
app/BlogView.swift

@@ -132,9 +132,9 @@ class BlogView: UIView {
 				
 				
 				// TODO: Do this on the row didLoad method
 				// TODO: Do this on the row didLoad method
 				// Set tap recognizer
 				// Set tap recognizer
-				let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(openPost(_:)))
-				row.isUserInteractionEnabled = true
-				row.addGestureRecognizer(tapRecognizer)
+				//let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(openPost(_:)))
+				//row.isUserInteractionEnabled = true
+				//row.addGestureRecognizer(tapRecognizer)
 				
 				
 				
 				
 				
 				
@@ -161,7 +161,7 @@ class BlogView: UIView {
 		
 		
 		//viewController.showPost(id: 4)
 		//viewController.showPost(id: 4)
 		
 		
-		print("BLOG:DEBUG: Show post on load.")
+		//print("BLOG:DEBUG: Show post on load.")
 		//self.delegate?.controller?.showPost(id: 4)
 		//self.delegate?.controller?.showPost(id: 4)
 		
 		
 		//controller.showPost(id: 4)
 		//controller.showPost(id: 4)
@@ -169,10 +169,10 @@ class BlogView: UIView {
 		
 		
 		
 		
 		
 		
-		
+		print("BLOG:DEBUG: Finished loading BlogView")
 	}
 	}
 	
 	
-	func openPost(){//(_ sender:UITapGestureRecognizer? = nil){
+	/*func openPost(){//(_ sender:UITapGestureRecognizer? = nil){
 		print("BLOG:DEBUG: getting delegate and showing post.")
 		print("BLOG:DEBUG: getting delegate and showing post.")
 		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
 		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
 		delegate.controller?.showPost(id: 4)
 		delegate.controller?.showPost(id: 4)
@@ -184,7 +184,7 @@ class BlogView: UIView {
 		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
 		let delegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
 		delegate.controller?.showPost(id: 4)
 		delegate.controller?.showPost(id: 4)
 		print("BLOG:DEBUG: Post should be shown.")
 		print("BLOG:DEBUG: Post should be shown.")
-	}
+	}*/
 	
 	
 	func getLanguage() -> String{
 	func getLanguage() -> String{
 		let pre = NSLocale.preferredLanguages[0].subStr(start: 0, end: 1)
 		let pre = NSLocale.preferredLanguages[0].subStr(start: 0, end: 1)

+ 1 - 1
app/BlogView.xib

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16B2657" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina3_5" orientation="portrait">
     <device id="retina3_5" orientation="portrait">
         <adaptation id="fullscreen"/>
         <adaptation id="fullscreen"/>
     </device>
     </device>

+ 11 - 7
app/PostView.swift

@@ -25,8 +25,10 @@ Class to handle the post view.
 */
 */
 class PostView: UIView {
 class PostView: UIView {
 	
 	
+	@IBOutlet var container: UIView!
 	//The main scroll view.
 	//The main scroll view.
 	@IBOutlet weak var scrollView: UIScrollView!
 	@IBOutlet weak var scrollView: UIScrollView!
+
 	
 	
 	@IBOutlet weak var title: UILabel!
 	@IBOutlet weak var title: UILabel!
 	
 	
@@ -56,20 +58,22 @@ class PostView: UIView {
 	*/
 	*/
 	required init?(coder aDecoder: NSCoder) {
 	required init?(coder aDecoder: NSCoder) {
 		
 		
+		print("POST:DEBUG: Init")
+		
 		super.init(coder: aDecoder)
 		super.init(coder: aDecoder)
 		
 		
-		//Load the contents of the HomeView.xib file.
-		Bundle.main.loadNibNamed("BlogView", owner: self, options: nil)
-		//self.addSubview(container)
-		//container.frame = self.bounds
+		//Load the contents of the PostView.xib file.
+		Bundle.main.loadNibNamed("PostView", owner: self, options: nil)
+		self.addSubview(container)
+		container.frame = self.bounds
 		
 		
 		
 		
 	}
 	}
 	
 	
 	func loadPost(id : Int){
 	func loadPost(id : Int){
 	
 	
-		// Show posts
-		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
+		// Show post
+		/*let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let lang : String = getLanguage()
 		let lang : String = getLanguage()
 		context.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
 		context.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
@@ -134,7 +138,7 @@ class PostView: UIView {
 			print("Blog curh: \(h)")
 			print("Blog curh: \(h)")
 		}
 		}
 		// TODO: Calculate at the end
 		// TODO: Calculate at the end
-		self.scrollView.contentSize.height = 2500//CGFloat(h);
+		self.scrollView.contentSize.height = 2500//CGFloat(h);*/
 	}
 	}
 	
 	
 	func getLanguage() -> String{
 	func getLanguage() -> String{

+ 3 - 12
app/PostView.xib

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16B2657" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina3_5" orientation="portrait">
     <device id="retina3_5" orientation="portrait">
         <adaptation id="fullscreen"/>
         <adaptation id="fullscreen"/>
     </device>
     </device>
@@ -11,20 +11,11 @@
     <objects>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PostView" customModule="app" customModuleProvider="target">
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PostView" customModule="app" customModuleProvider="target">
             <connections>
             <connections>
-                <outlet property="commentContent" destination="kba-hh-hSu" id="awu-5F-mxL"/>
-                <outlet property="commentCount" destination="w3V-dl-ijf" id="5Vn-ki-Mzq"/>
-                <outlet property="commentList" destination="For-Ru-u5Y" id="DBl-M2-7iO"/>
-                <outlet property="commentUser" destination="4Rd-hH-5iP" id="0Mk-Q5-mqo"/>
-                <outlet property="date" destination="lBQ-aX-qhL" id="KDe-Bo-Utv"/>
-                <outlet property="image" destination="vwR-EU-h1T" id="6hL-jI-oGf"/>
-                <outlet property="imageExtra" destination="L5f-5R-97B" id="iCs-yP-Kzd"/>
-                <outlet property="scrollView" destination="8gP-MM-Wzw" id="ABL-y6-ZHh"/>
-                <outlet property="text" destination="NoQ-Kc-oS7" id="LNM-QN-1DR"/>
-                <outlet property="title" destination="4ub-YM-i5l" id="yWW-H6-DCF"/>
+                <outlet property="container" destination="Zrz-uS-eQa" id="UV8-P9-jMA"/>
             </connections>
             </connections>
         </placeholder>
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="Zrz-uS-eQa" customClass="PostView" customModule="app" customModuleProvider="target">
+        <view contentMode="scaleToFill" id="Zrz-uS-eQa" userLabel="Container">
             <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
             <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
             <subviews>

+ 17 - 0
app/ViewController.swift

@@ -38,6 +38,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	@IBOutlet weak var containerViewLablanca: UIView!
 	@IBOutlet weak var containerViewLablanca: UIView!
 	@IBOutlet weak var containerViewLocation: UIView!
 	@IBOutlet weak var containerViewLocation: UIView!
 	@IBOutlet weak var containerViewHome: HomeView!
 	@IBOutlet weak var containerViewHome: HomeView!
+	@IBOutlet weak var containerViewPost: PostView!
 	
 	
 	
 	
 	func getContext () -> NSManagedObjectContext {
 	func getContext () -> NSManagedObjectContext {
@@ -48,6 +49,15 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	
 	
 	func showPost(id: Int){
 	func showPost(id: Int){
 		print("CONTROLLER:DEBUG: showPost \(id)")
 		print("CONTROLLER:DEBUG: showPost \(id)")
+		UIView.animate(withDuration: 0.5, animations: {
+			self.containerViewHome.alpha = 0
+			self.containerViewLocation.alpha = 0
+			self.containerViewLablanca.alpha = 0
+			self.containerViewActivities.alpha = 0
+			self.containerViewBlog.alpha = 0
+			self.containerViewGallery.alpha = 0
+			self.containerViewPost.alpha = 1
+		})
 	}
 	}
 	
 	
 	/**
 	/**
@@ -61,6 +71,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 		self.containerViewActivities.alpha = 0
 		self.containerViewActivities.alpha = 0
 		self.containerViewBlog.alpha = 0
 		self.containerViewBlog.alpha = 0
 		self.containerViewGallery.alpha = 0
 		self.containerViewGallery.alpha = 0
+		self.containerViewPost.alpha = 0
 		
 		
 		//self.containerViewBlog.isHidden = true
 		//self.containerViewBlog.isHidden = true
 				
 				
@@ -153,6 +164,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 				self.containerViewActivities.alpha = 0
 				self.containerViewActivities.alpha = 0
 				self.containerViewBlog.alpha = 0
 				self.containerViewBlog.alpha = 0
 				self.containerViewGallery.alpha = 0
 				self.containerViewGallery.alpha = 0
+				self.containerViewPost.alpha = 0
 			})
 			})
 		}
 		}
 		else if selected == 1 {
 		else if selected == 1 {
@@ -163,6 +175,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 				self.containerViewActivities.alpha = 0
 				self.containerViewActivities.alpha = 0
 				self.containerViewBlog.alpha = 0
 				self.containerViewBlog.alpha = 0
 				self.containerViewGallery.alpha = 0
 				self.containerViewGallery.alpha = 0
+				self.containerViewPost.alpha = 0
 			})
 			})
 		}
 		}
 		else if selected == 2 {
 		else if selected == 2 {
@@ -173,6 +186,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 				self.containerViewActivities.alpha = 0
 				self.containerViewActivities.alpha = 0
 				self.containerViewBlog.alpha = 0
 				self.containerViewBlog.alpha = 0
 				self.containerViewGallery.alpha = 0
 				self.containerViewGallery.alpha = 0
+				self.containerViewPost.alpha = 0
 			})
 			})
 		}
 		}
 		else if selected == 3 {
 		else if selected == 3 {
@@ -183,6 +197,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 				self.containerViewActivities.alpha = 1
 				self.containerViewActivities.alpha = 1
 				self.containerViewBlog.alpha = 0
 				self.containerViewBlog.alpha = 0
 				self.containerViewGallery.alpha = 0
 				self.containerViewGallery.alpha = 0
+				self.containerViewPost.alpha = 0
 			})
 			})
 		}
 		}
 		else if selected == 4 {
 		else if selected == 4 {
@@ -193,6 +208,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 				self.containerViewActivities.alpha = 0
 				self.containerViewActivities.alpha = 0
 				self.containerViewBlog.alpha = 1
 				self.containerViewBlog.alpha = 1
 				self.containerViewGallery.alpha = 0
 				self.containerViewGallery.alpha = 0
+				self.containerViewPost.alpha = 0
 			})
 			})
 		}
 		}
 		else if selected == 5 {
 		else if selected == 5 {
@@ -203,6 +219,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 				self.containerViewActivities.alpha = 0
 				self.containerViewActivities.alpha = 0
 				self.containerViewBlog.alpha = 0
 				self.containerViewBlog.alpha = 0
 				self.containerViewGallery.alpha = 1
 				self.containerViewGallery.alpha = 1
+				self.containerViewPost.alpha = 0
 			})
 			})
 		}
 		}