Page events (show, hide)

43 views
Skip to first unread message

Stephane Bisson

unread,
Jan 15, 2014, 12:41:18 PM1/15/14
to calatrav...@googlegroups.com
Hi, 

My app is a simple analog clock. It animates the second hand. How do I turn the animation on when the page is shown and off when it is not shown?

thanks, 
stephane

Giles Alexander

unread,
Jan 16, 2014, 5:23:37 AM1/16/14
to Stephane Bisson, calatrav...@googlegroups.com
That depends :)

To me, animation management should be happening in the view, not the controller. This makes the job of detecting when you're on- and off-screen different for each platform. Have a look at:


For example, for web you should implement show() and hide() for your page objects. For iOS, you'll probably be implementing viewDisappeared. Or whatever it's called.

Giles


--
You received this message because you are subscribed to the Google Groups "calatrava-mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to calatrava-mobi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages