I updated to Xcode 8 beta 6 and I am getting very weird errors

2.3k Views Asked by At

I just update to Xcode 8 beta 6 and got an overload of errors (no surprise), I got most of them sorted out, but there are two errors which I am unsure of 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)
3

There are 3 best solutions below

1
On BEST ANSWER

The method signature has changed in Xcode 8 now it is the following:

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
   // Code here
}
0
On

Basically AnyObject is now Any in most functions

0
On

You should use

String(describing: self.type)

instead of

String(self.type)