Reputation: 5461
I have a swift Class with an enum and a method which expects a parameter of with type of the enum:
import SpriteKit
enum Direction: Int {
case up = 1;
case down = -1;
}
class ParallaxScrollingNode: SKNode {
func addStaticBackground(name: String) {
...
}
func addParallaxBackground(imageNames: [String], yScaleFactor: CGFloat, yDirection: Direction) {
...
}
In my Objective C class it is possible to call the first, but not the second method:
Looks like the enum is causing the issue. The method is missile, if I change the type to Int. Of course I can do this with my code, but I want to understand if this is not working in general or if I have missed something.
Thanks
Stefan
Upvotes: 1
Views: 1090