Guest User

Untitled

a guest
May 25th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
  2. let vc = storyboard?.instantiateViewController(withIdentifier: "twoVC") as? twoVC
  3.  
  4. self.navigationController?.pushViewController(vc!, animated: true)
  5. //Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
  6.  
  7. }
  8.  
  9.  
  10. }
  11.  
  12. class twoVC : UIViewController {
  13. @IBOutlet var label : UILabel!
  14.  
  15. @IBOutlet var photo : UIImageView!
  16.  
  17.  
  18.  
  19. }
Add Comment
Please, Sign In to add comment