I upgraded to Xcode 8 beta 6 and I get very strange errors

I just update Xcode 8 beta 6 and get error overloading (not surprisingly), I got most of them, but there are two errors that I'm not sure how to fix.

For this I get this error Method does not override any method from its superclass

override func prepare(for segue: UIStoryboardSegue, sender: AnyObject?) {
    if(segue.identifier == "***"){

    }
}

And for this I get this error init has been renamed to init(describing:)

return String(self.type)
+4
source share
3 answers

In Xcode 8, the method signature has changed, now it looks like this:

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
   // Code here
}
+11
source

You have to use

String(describing: self.type)

instead

String(self.type)

+9
source

AnyObject

+3

Source: https://habr.com/ru/post/1651705/


All Articles