Could not cast value of type 'UIViewController' (0x1f18796b0) to 'Color_App.ColorsDetailVC' (0x1022bdbd0).

here is the code: override func prepare(for segue: UIStoryboardSegue, sender: Any?) { let destVC = segue.destination as! ColorsDetailVC destVC.cdvc_color = sender as? UIColor }

This implies that either you didn't set the class of the view controller correctly in the storyboard, or the destination of the seque isn't what you expected.

Could not cast value of type 'UIViewController' (0x1f18796b0) to 'Color_App.ColorsDetailVC' (0x1022bdbd0).
 
 
Q