I have been experimenting with creating a Scene and adding a number of layers inside the scene and capturing the different touch events, this works great.
Now I would like to have a way of switching between two scenes when a user taps on the screen (each scene would ideally have a different layer layout and different touch actions).
I am keen to use SceneView so that i can also use buttons, etc. A started with a simple example to call my Scene that works well:
sv = SceneView()
sv.scene = MyScene()
sv.present('sheet')
I then tried to create a new class where i would overload the touch_ended function to switch to the other scene:
class MyView(SceneView):
def __init__(self):
self.scene = MyScene()
def touch_ended(self,touch):
self.scene = OtherScene()
But the python interpreter complains that the type 'scene SceneView' is not an acceptable base type...
I'm new to iOS and to this ui module, so i'm probably going about it the wrong way, any pointers very welcome
Thanks
Eduardo