Hi, How do we access variables dynamically from a for loop. For example, I am defining 4 variables and then trying to assign layers to these variables like this but its not working:
B1=""B2=""B3 = ""B4 = ""for i in [0...4] B+i = sketch.Buttons.subLayers[i].subLayers
You need to store your variables in an array and use the for loop to access them.
that gives you this:
Thanks, I ended up figuring out the same thing :) Managed to get it working. I am building something which I will share soon.
He is an older version of something that I am refining right now. This works, but I am changing the design and interactions a little bit: