iOS: How do I know if user left the current screen? -


i want build analytics app , send data when user leaves current screen, though there multiple ways can (back button, other button, sidebar menu, etc). there efficient way this? don't feel implementing every possible button can lead user different screen.

you should call function inside viewwilldisappear, called every time current view controller disappear screen. see documentation of viewwilldisappear see view controller life cycle (thanks @paolo tip) below (documentation). enter image description here


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -