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…
2
Answers
This is my complete code:
and:
The first code snipped is from the ViewController file
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 by naming it
UIViewController
.You need to replace
class UIViewController {
withextension UIViewController {