So I'm hoping to learn about making a scrollview of icons (kinda like a menu) in Spritekit
, using Swift
. I can't find any good resources or tutorials that don't charge.
I have my basic app set up with a ViewController and my scene. I'm hoping to have a scrollview that's say 2 or 3 times longer than the height of the screen, where I can scroll up and down and view different icons.
I hope this would be a good implementation, so I can programmatically set all the icons using x/y coordinates.
My viewdidLoad:
override func didMoveToView(view: SKView) {
/* Setup your scene here */
addChild(worldNode)
//create Scrollview
//for loop to adding icons from top to bottom of scrollview
//name sprites
//use touch location so allow sprites to be clickable
//will just adjust alpha of icon for testing purposes later
}
This is really all I'm looking at achieving at the moment, if you can imagine, something like this:
Some of the questions that I have seen here seem to go in far more detail than I imagine I need, and are too complex for me at this stage, or they are not in swift...
How can I include a scrollview? Thank you in advance :)