 
 		setupCollectionView()
 	}
+
+
+	public override func viewDidAppear(animated: Bool) {
+		super.viewDidAppear(animated)
+
+		appearState = .DidAppear
+		updateAppearStateForAllCellsAnimated(animated)
+	}
+
+
+	public override func viewDidDisappear(animated: Bool) {
+		super.viewDidDisappear(animated)
+
+		appearState = .DidDisappear
+		updateAppearStateForAllCellsAnimated(animated)
+	}
+
+
+	public override func viewWillAppear(animated: Bool) {
+		super.viewWillAppear(animated)
+
+		appearState = .WillAppear
+		updateAppearStateForAllCellsAnimated(animated)
+	}
+
+
+	public override func viewWillDisappear(animated: Bool) {
+		super.viewWillDisappear(animated)
+
+		appearState = .WillDisappear
+		updateAppearStateForAllCellsAnimated(animated)
+	}
 }
 
 

	public func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
		precondition(collectionView === self.collectionView)

		let viewController = viewControllers[indexPath.item]

		let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! Cell
		cell.viewController = viewController

		return cell
	}



			return
		}

		isAnimatingScrollView = false

		updateAppearStateForAllCellsAnimated(true)
		updatePrimaryViewController()
	}


	public func scrollViewDidEndDragging(scrollView: UIScrollView, willDecelerate decelerate: Bool) {
		guard scrollView === collectionView else {
			return
		}

		isAnimatingScrollView = false

		if !decelerate {
			updateAppearStateForAllCellsAnimated(true)
			updatePrimaryViewController()
		}
	}
	

