-2

I have imported some project done in Swift 1 in Xcode 7 and now I am getting the following errors:

enter image description here

enter image description here

Any idea on how I can solve them?

mm24
  • 9,280
  • 12
  • 75
  • 170

1 Answers1

0

Solve them 1 by 1:

  1. Make sure to override the correct function. The signature changed between swift 1 and 2 so you are now trying to override something that you use the wrong method signature for.
  2. the second error will likely resolve when you fix the first one because your supers signature is the same as the one you try to override
  3. In Swift 2 the first name of the argument is omitted if the signature is unambiguous. Try that. If that doesn't help, use the proper names for the arguments to the NSString constructor. Actually, ditch using NSString and just load the swift string class with the contents of that file as you cast it to String anyways...
der_michael
  • 3,151
  • 1
  • 24
  • 43