|
@@ -38,10 +38,6 @@ 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 var containerViewPost: PostView!
|
|
|
|
|
-
|
|
|
|
|
- var refViewPost: PostView!
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
func getContext () -> NSManagedObjectContext {
|
|
func getContext () -> NSManagedObjectContext {
|
|
|
//let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
|
//let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
|
@@ -51,27 +47,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
|
|
|
|
|
func showPost(id: Int){
|
|
func showPost(id: Int){
|
|
|
print("CONTROLLER:DEBUG: showPost \(id)")
|
|
print("CONTROLLER:DEBUG: showPost \(id)")
|
|
|
-
|
|
|
|
|
- if self.containerViewPost == nil{
|
|
|
|
|
- print("CONTROLLER:DEBUG: containerViewPost has been released")
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- 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
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- //TODO get the uiview from the storyboard again
|
|
|
|
|
- //self.storyboard?..instantiateViewController(withIdentifier: "PostView")
|
|
|
|
|
- self.containerViewPost = PostView()
|
|
|
|
|
- containerViewPost.title.text = "AAAAA"
|
|
|
|
|
- //hself.refViewPost.loadPost(id: id)
|
|
|
|
|
|
|
+ performSegue(withIdentifier: "SeguePost", sender: nil)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -85,9 +61,6 @@ 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.2
|
|
|
|
|
-
|
|
|
|
|
- self.refViewPost = self.containerViewPost
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -105,11 +78,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
delegate = UIApplication.shared.delegate as! AppDelegate
|
|
delegate = UIApplication.shared.delegate as! AppDelegate
|
|
|
delegate?.controller = self
|
|
delegate?.controller = self
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- //self.containerViewPost.loadPost(id: 16)
|
|
|
|
|
- print(type(of:containerViewPost))
|
|
|
|
|
- 5//self.containerViewPost.lp()
|
|
|
|
|
- print(self.containerViewBlog.borderColor)
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -188,7 +156,6 @@ 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 {
|
|
@@ -199,7 +166,6 @@ 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 {
|
|
@@ -210,7 +176,6 @@ 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 {
|
|
@@ -221,7 +186,6 @@ 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 {
|
|
@@ -232,7 +196,6 @@ 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 {
|
|
@@ -243,7 +206,6 @@ 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
|
|
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|