|
|
@@ -60,7 +60,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
:param: coder Coder.
|
|
|
*/
|
|
|
required init?(coder aDecoder: NSCoder) {
|
|
|
- NSLog(":CONTROLLER:DEBUG: Init!")
|
|
|
super.init(coder: aDecoder)
|
|
|
|
|
|
}
|
|
|
@@ -86,7 +85,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
:param: id The post id.
|
|
|
*/
|
|
|
func showPost(id: Int){
|
|
|
- NSLog(":CONTROLLER:DEBUG: Showing Post \(id)")
|
|
|
self.passId = id
|
|
|
performSegue(withIdentifier: "SeguePost", sender: nil)
|
|
|
}
|
|
|
@@ -97,7 +95,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
:param: id The activity id.
|
|
|
*/
|
|
|
func showPastActivity(id: Int){
|
|
|
- NSLog(":CONTROLLER:DEBUG: Showing past activity \(id)")
|
|
|
self.passId = id
|
|
|
performSegue(withIdentifier: "SeguePastActivity", sender: nil)
|
|
|
}
|
|
|
@@ -108,10 +105,10 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
:param: id The activity id.
|
|
|
*/
|
|
|
func showFutureActivity(id: Int){
|
|
|
- NSLog(":CONTROLLER:DEBUG: Showing future activity \(id)")
|
|
|
self.passId = id
|
|
|
- // TODO
|
|
|
+ // TODO set future segue
|
|
|
//performSegue(withIdentifier: "SegueFutureActivity", sender: nil)
|
|
|
+ performSegue(withIdentifier: "SeguePastActivity", sender: nil)
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -120,23 +117,19 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
:param: id The album id.
|
|
|
*/
|
|
|
func showAlbum(id: Int){
|
|
|
- NSLog(":CONTROLLER:DEBUG: Showing album \(id)")
|
|
|
self.passId = id
|
|
|
performSegue(withIdentifier: "SegueAlbum", sender: nil)
|
|
|
}
|
|
|
|
|
|
|
|
|
- // TODO: This must go in it AlbumViewController
|
|
|
/**
|
|
|
Shows a photo.
|
|
|
:param: id The album id.
|
|
|
*/
|
|
|
func showPhoto(album: Int, photo: Int){
|
|
|
- NSLog(":CONTROLLER:DEBUG: Showing photo \(photo) of album \(album)")
|
|
|
self.passAlbum = album
|
|
|
self.passId = photo
|
|
|
performSegue(withIdentifier: "SeguePhoto", sender: nil)
|
|
|
- NSLog(":CONTROLLER:DEBUG: PHOTO should be shown")
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -145,7 +138,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
:param: margolari True for the margolari schedule, false for the city one.
|
|
|
*/
|
|
|
func showSchedule(margolari: Bool){
|
|
|
- NSLog(":CONTROLLER:DEBUG: Showing schedule. Margolari: \(margolari)")
|
|
|
if margolari == true{
|
|
|
self.passId = 1
|
|
|
}
|
|
|
@@ -163,12 +155,10 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
*/
|
|
|
func initialSync(showScreen: Bool){
|
|
|
if showScreen == true{
|
|
|
- NSLog(":CONTROLLER:DEBUG: Showing initial sync screen.")
|
|
|
performSegue(withIdentifier: "SegueSync", sender: nil)
|
|
|
Sync(synchronous: true)
|
|
|
}
|
|
|
else{
|
|
|
- NSLog(":CONTROLLER:DEBUG: Re-populating views and hidding initial sync screen.")
|
|
|
NSLog(":CONTROLLER:DEBUG: Re-populating disabled: Throws error.")
|
|
|
//self.populate()
|
|
|
syncSegue?.destination.dismiss(animated: true, completion: nil)
|
|
|
@@ -182,7 +172,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
:sender: The calling view.
|
|
|
*/
|
|
|
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
|
|
- NSLog(":CONTROLLER:DEBUG: preparing for segue '\(String(describing: segue.identifier))' with id \(self.passId)")
|
|
|
if segue.identifier == "SeguePost"{
|
|
|
(segue.destination as! PostViewController).id = passId
|
|
|
}
|
|
|
@@ -214,7 +203,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
}
|
|
|
|
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
|
- NSLog(":CONTROLLER:DEBUG: Forcing a call to populate")
|
|
|
self.populate()
|
|
|
super.viewWillAppear(animated)
|
|
|
}
|
|
|
@@ -262,6 +250,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
As of now, not working.
|
|
|
*/
|
|
|
func populate(){
|
|
|
+ // TODO Set this up.
|
|
|
if (self.containerViewHome != nil){
|
|
|
//(self.containerViewHome as HomeView).populate()
|
|
|
//let ng = self.containerViewHome.dbgTxt
|
|
|
@@ -371,23 +360,8 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
:param: selected Index of the selected item.
|
|
|
*/
|
|
|
@IBAction func showComponent(selected: Int) {
|
|
|
- NSLog(":CONTROLLER:DEBUG: Selected: \(selected)")
|
|
|
//Activate label
|
|
|
var i = 0
|
|
|
-
|
|
|
-
|
|
|
- /*for cell in sectionCollection.visibleCells as! [MenuCollectionViewCell]{ //TODO: Not only visibles!
|
|
|
- if i == selected + 1{
|
|
|
- cell.bar.backgroundColor = UIColor(red: 90/255, green: 180/255, blue: 255/255, alpha: 1)
|
|
|
- cell.label.font = UIFont.boldSystemFont(ofSize: cell.label.font.pointSize)
|
|
|
- }
|
|
|
- else{
|
|
|
- cell.bar.backgroundColor = UIColor(red: 148/255, green: 209/255, blue: 255/255, alpha: 1)
|
|
|
- cell.label.font = UIFont.systemFont(ofSize: cell.label.font.pointSize)
|
|
|
-
|
|
|
- }
|
|
|
- i = i + 1
|
|
|
- }*/
|
|
|
|
|
|
//Show the view
|
|
|
if selected == 0 {
|
|
|
@@ -450,9 +424,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
|
|
|
self.containerViewGallery.alpha = 1
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|