In my application i want to do a session timeout after some time of inactivity. But if the user interacts with the app the timer needs to be reset.
Main concern is this should be implemented in part of the application not for the whole application, so is there any alternative for subclassing UIApplication to detect user interaction.
I do have a base class for those particular controller but touch or gesture delegates are not getting called in base class.
How can I detect user interaction for few controllers.
Thanks in advance for any ideas and help.
So, I figured out a way. In my base class, I was setting tap gesture on view earlier.
so instead of
view.addGestureRecognizer(tap)now I am adding gesture onwindowand I implemented
UIGestureRecognizerDelegateSo, Now my base class is able to detect any taps and calling the
delegate.Please Note: Adding this
delegate/ gestureis not effecting the touch or gesture on any of the other views of my child classes.