title: Expanding UICollectionView and its cell when tapped
body: <p>I am trying to make a transition animation like the demonstration in the link <a href="https://dribbble.com/shots/2733571-Citadela-countries" rel="nofollow">here</a>. So when I clicked the cell, it expands and covers the whole screen.</p>
  
  <p>Here are my codes(I have to admit that I am not familiar with CollectionView)`</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate {
  
  @IBOutlet weak var mainDesLabel: UILabel!
  @IBOutlet weak var collectionView: UICollectionView!
  @IBOutlet weak var secDesLabel: UILabel!
  let searchBar = UISearchBar()
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
      self.collectionView.delegate   = self
      self.collectionView.dataSource = self
      self.collectionView.backgroundColor = UIColor.clearColor()
      ////////////////////////////////////////////////////////////////////////
      self.searchBar.frame = CGRect(x: 175, y: 0, width: 200, height: 50)
      self.searchBar.searchBarStyle = UISearchBarStyle.Minimal
      self.searchBar.backgroundColor = UIColor.whiteColor()
      self.view.addSubview(searchBar)
      ////////////////////////////////////////////////////////////////////////
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      return 10
  }
  
  func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
      let cell = collectionView.dequeueReusableCellWithReuseIdentifier("cell", forIndexPath: indexPath) as UICollectionViewCell
  
      cell.layer.cornerRadius = 5
  
      return cell
  }
  
  
  
  func numberOfSectionsInCollectionView(collectionView: UICollectionView) -&gt; Int {
      return 1
  }
  
  //Use for size
  func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
      self.collectionView.frame = self.view.bounds
      let cell = collectionView.cellForItemAtIndexPath(indexPath)
      cell!.frame = CGRectMake(0, 0, self.view.bounds.width, self.view.bounds.height)
  }
  
  
  }
  </code></pre>
  
  <p>So I thought use 'didSelectItemAtIndexPath' would help, however it turns out like <a href="http://i.stack.imgur.com/MxR8F.png" rel="nofollow">this</a></p>
  
  <p>thoughts? Any help would be highly appreciated!</p>