override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let secondVC = segue.destination as! SettingsViewController //error is marked here
secondVC.transitioningDelegate = self
secondVC.modalPresentationStyle = .custom
}
func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
transition.transitionMode = .present
transition.startingPoint = settingsButton.center
transition.circleColor = UIColor.white
return transition
}
func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
transition.transitionMode = .dismiss
transition.startingPoint = settingsButton.center
transition.circleColor = UIColor.white
return transition
}
I am following this tutorial to animate my Xcode application using Swift. I am running into the error of my SettingsViewController not being able to be cast as a UIViewController. I have checked out other questions with the same error but I have not found anything useful.
I am getting the error - SIGABRT: Could not cast value of type 'UIViewController' (0x7fff897a42b8) to 'Healthify.SettingsViewController' (0x107cd6a98)
Anyone know what I am doing wrong or experienced something similar?