Forum Archive

Image help

Dalorbi39

Okay i started devoting time to start learning how to use the pythonista modules and was wondering how would you go about loading up an image and displaying it.

If you have time could you make it rotate when the user touches the screen so i can see how to apply effects

C0deH4cker

https://gist.github.com/a066691269d63ddc0d4c

Dalorbi39

lol @C0deH4cker, i forgot about the examples. Just had one of those moments i suppose

yodayoda230

Thanks for the basic example, CH. What's interesting is that,at first sight, it looks like every time u touch it will rotate 90deg:
......self.layer.animate('rotation', self.layer.rotation + 90)......
And indeed it does if u touch once every second etc.

But touch twice quickly, and this doesn't happen. It only gets part-way thru the rotation, then rotates again
guess the 'touch-ended' bit would need to do a check to see the 90deg had completed somehow

Just saying even something simple gets complicated! :-/