What I do: rootVC —> modalView1 —> modalView2 —> modalView3 —> dismiss modalView3 to rootVC then reload collectionView
the collectionView is in the rootVC.
This is the code for going back to rootVC: self.view.window!.rootViewController?.dismiss(animated: true, completion: nil)
dismissing to rootVC is working but error occurs during collectionView.reloadData()
Thanks in advance!
modalViewController1
? Also, where iscollectionView
exactly? onrootVC
? – Larme