Either I see strange behavior from Swift, or I'm doing something wrong.
Let's say you have an obj-c class called TurtleHelper that looks like this:
@interface TurtleHelper : NSObject
+(NSDictionary*)getTurtles;
@end
Then I want to override this method in Swift, so I do this:
class SwiftTurtles: TurtleHelper {
override class func getTurtles() -> NSDictionary {
...
}
}
The compiler gives me the following error:
The overriding method with the getTurtles selector is of the incompatible type '() -> NSDictionary'
What am I doing wrong?
source
share