anonymous
anonymous

Reputation: 371

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

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)

Upvotes: 4

Views: 2308

Answers (3)

darren102
darren102

Reputation: 2830

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

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

Upvotes: 11

Kerim G.
Kerim G.

Reputation: 332

You should use

String(describing: self.type)

instead of

String(self.type)

Upvotes: 9

Greg Robertson
Greg Robertson

Reputation: 2357

Basically AnyObject is now Any in most functions

Upvotes: 3

Related Questions