Reputation: 461
I want to make a vertical scrolling view for the level selector on my SpriteKit game, I don't know if I have to use UIScrollView
or make it using the SpriteKit framework. Please if anyone knows the best way to do it and how let me know. Thanks.
Upvotes: 11
Views: 5261
Reputation: 1545
You have several options here.
It is possible to integrate UI elements into SpriteKit, but instead of adding children to self
(your scene), you would add subviews to self.view
. You would of course, work with the view now instead of a scene so theres a different way of positioning elements which you would have to work out. Theres quite a few examples of how to do this, here's one that might help you.
An alternative is using something like Scroll Kit, which helps you integrate a UIScrollView into SpriteKit very conveniently!
Also check out this question which might be exactly what you're looking for. Hope this helps!
Upvotes: 10