Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

UIViewController can't override method from it's superclass

I am actually experimenting with the Vision Framework.
I have simply an UIImageView in my Storyboard and my class is from type UIViewController.
But when I try to override viewDidAppear(_ animated: Bool) I get the error message: Method does not override any method from its superclass
Do anyone know what the issue is? Couldn’t find anything that works for me…

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

So after looking at the code, you are declaring a new class called UIViewController. Maybe you meant extension instead of class.
That’s the reason the compiler could not find the method because you overwrote it by creating that new class called UIViewController.

replace

class UIViewController {

with

extension UIViewController {
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading