I put together a quick demo project of how to create a swipe UI with page control dots. The main takeaway is that it knows what page you're on, so you can do a bunch of other shenanigans based on that.
you can grab the project here: https://dl.dropboxusercontent.com/u/1916165/edchao_pagecontrol.framer.zip
Nice job Ed, had to build something similar last week and didn't get a chance to wire up the dots. Looking forward to checking out your implementation.
Chad Lonberger yeah let me know what you think :)
this is amazing and should be a component native to framer. Are you using the undocumented scrollview?
oh no, it looks like you just used draggable objects! clever
Johannes Eckert hm! I never even thought about doing it that way, but tracking a scrollViews x position and then animating it into a specific position depending on what item you are viewing in the scollview sounds compelling.
Initially I tried the scrollview approach but it wasn't playing nice with mobile. May have not explored it fully though.
Tracking the scrollview's x is reliable with the new scrollview that Koen is working on (some post a few weeks ago)Then setting the target x to animate to is more a matter of multiplying the screenwidth by currentIndex
Johannes Eckert good news thanks
Thank you so much! That is just what I was looking for! :)
This is great! Can you explain or provide a reference to what's happening on line 48? [0..stack.length-1].map (i) it's mainly the brackets and the 0..stack that I find confusing. Thanks so much for posting!
thats just coffeescripts way of saying iterate through this array from index 0 to the length of the stack array and map all the following to each index. It's very similar to a for loop.
Gotcha! Thanks! I saw your comment on a previous post and started to suss it out but sometimes I am a bit lost with coffeescript.