title: self.navigationController?.pushViewController not Working Swift
body: <p>I have CollectionViewController, when I am trying to click on cell and navigate to respective ViewControllers its not working.how can I solve this issue.</p>
  
  <pre><code>func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
      let cell:AddOptionCollectionViewCell = collectionView.cellForItem(at: indexPath) as! AddOptionCollectionViewCell
  
      if (cell.name.text == "CONTRAST"){
          let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
  
          let newViewController = storyBoard.instantiateViewController(withIdentifier: "ContrastViewController") as! ContrastViewController
          self.navigationController?.pushViewController(newViewController, animated: true)
      }
  </code></pre>