Hi,
is there a possibilty to execute code when one page of the web app has been loaded completely or the user switched to one page?
Best Regards,
Fabian
Hi,
is there a possibilty to execute code when one page of the web app has been loaded completely or the user switched to one page?
Best Regards,
Fabian
Hi Fabian,
every Page has visibleDidChange function which is called when the page gets shown/hidden. Just make sure you've not forgotten to call visibleDidChange of the parent.
LeoCode:global.lastfm.LandingPage = { visibleDidChange: function(visible, oldVisible) { this.constructor.prototype.visibleDidChange.apply(this, arguments); //do your stuff } }
This get's triggered a few times when loading the app. Do you know why?
The default value of the visible property of the page is false. That's the first initial call. Then it becomes visible (true) which leads to the second call.