Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
- let vc = storyboard?.instantiateViewController(withIdentifier: "twoVC") as? twoVC
- self.navigationController?.pushViewController(vc!, animated: true)
- //Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
- }
- }
- class twoVC : UIViewController {
- @IBOutlet var label : UILabel!
- @IBOutlet var photo : UIImageView!
- }
Add Comment
Please, Sign In to add comment