I have a quick class with an enumeration and a method that expects a parameter with an enumeration type:
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, you can call the first, but not the second method:

The listing seems to be causing the problem. A method is a rocket if I change the type to Int. Of course, I can do this with my code, but I want to understand if this does not work at all, or if I missed something.
Thanks
Stefan
source
share