donnieh
Dec 08, 2015 - 17:13
I am not having much luck animating content offset. When the view loads I want the scrollview to glide to the offset position. Any tips implementing the ui.animate() function.
import ui
w, h = ui.get_screen_size()
sv = ui.ScrollView()
sv.frame = (0,0,w,h)
sv.background_color = 'gray'
sv.content_size = (0, 2000)
y_offset = 1000
sv.present()
sv.content_offset = (0, y_offset) #animate me