瀏覽代碼

Album view shown.

Iñigo Valentin 9 年之前
父節點
當前提交
476ee08c06
共有 4 個文件被更改,包括 6 次插入6 次删除
  1. 1 1
      app/AlbumViewController.swift
  2. 0 1
      app/Base.lproj/Main.storyboard
  3. 3 2
      app/RowAlbum.swift
  4. 2 2
      app/ViewController.swift

+ 1 - 1
app/AlbumViewController.swift

@@ -52,7 +52,7 @@ class AlbumViewController: UIViewController, UIGestureRecognizerDelegate {
 		NSLog(":GALLERYCONTROLLER:LOG: Init album.")
 		
 		super.viewDidLoad()
-		self.loadGallery(id: id)
+		self.loadAlbum(id: id)
 		
 		// Set button action
 		barButton.addTarget(self, action: #selector(self.back), for: .touchUpInside)

+ 0 - 1
app/Base.lproj/Main.storyboard

@@ -683,7 +683,6 @@
                         <outlet property="albumTitle" destination="YsV-il-CeR" id="t9S-NX-eaE"/>
                         <outlet property="barButton" destination="Thj-0t-rxK" id="6bX-xo-abt"/>
                         <outlet property="barTitle" destination="LLe-aQ-Sbj" id="bFR-jT-Xmq"/>
-                        <outlet property="postTitle" destination="YsV-il-CeR" id="Lg2-ea-EeY"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="GLj-OZ-Cqc" userLabel="First Responder" sceneMemberID="firstResponder"/>

+ 3 - 2
app/RowAlbum.swift

@@ -27,10 +27,11 @@ Extension of UIView to be formatted as sections.
 @IBDesignable class RowAlbum: UIView {
 	
 	// Outlets
-	
 	@IBOutlet weak var photo0: UIImageView!
 	@IBOutlet weak var photo1: UIImageView!
 	
+	// Album ID
+	var id = -1
 	
 	// This view
 	var v: UIView!
@@ -65,7 +66,7 @@ Extension of UIView to be formatted as sections.
 		super.init(frame: CGRect(x: 0, y: 0, width: 1000, height: 1000))
 		loadViewFromNib()
 		v = self
-		self.frame = bself.ounds
+		self.frame = self.bounds
 		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
 		self.translatesAutoresizingMaskIntoConstraints = true
 		

+ 2 - 2
app/ViewController.swift

@@ -57,7 +57,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 		NSLog(":CONTROLLER:DEBUG: Showing album \(id)")
 		self.passId = id
 		// TODO: Uncomment when ready
-		//performSegue(withIdentifier: "SegueAlbum", sender: nil)
+		performSegue(withIdentifier: "SegueAlbum", sender: nil)
 	}
 	
 	override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
@@ -66,7 +66,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 			(segue.destination as! PostViewController).id = passId
 		}
 		if segue.identifier == "SegueAlbum"{
-			(segue.destination as! PostViewController).id = passId
+			(segue.destination as! AlbumViewController).id = passId
 		}
 	}