Skip to content

Instantly share code, notes, and snippets.

@TimonVS
Last active December 13, 2015 18:14
Show Gist options
  • Save TimonVS/1c0f31d5887186285e84 to your computer and use it in GitHub Desktop.
Save TimonVS/1c0f31d5887186285e84 to your computer and use it in GitHub Desktop.
amount = 7
allIndicators = []
indicatorsContainer = new Layer
backgroundColor: "transparent"
width: page.width
height: 14
x: 0
y: 1291
index: 5
for i in [0...amount]
indicator = new Layer
backgroundColor: "white"
width: 14
height: 14
x: 30 * i
y: 0
borderRadius: "50%"
opacity: 0.5
superLayer: indicatorsContainer
indicator.x += (page.width / 2) - 9 - (12 * amount)
indicator.states.add(active: {opacity: 1})
indicator.states.animationOptions = time: 0.5
allIndicators.push(indicator)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment