Is there a way to catch all sorts of user interactions, but first and foremost button presses in an iOS app? I'm interested in logging these events with a time stamp and ideally with the name of the screen they appear on.
I guess the simplest way is to insert a call of a custom log function into every action called by a button. But that's too much effort.
I also thought about subclassing UIButton
, but this would still require me to change every button in an existing app and would work only for buttons (not cells in a table for example).
Is there a point were I can intercept touches in general? Or a point were I specifically know a button was pressed and I've a reference to that button?
(We research usability testing of mobile apps, so we aim at a modular solution that can be easily reused and needs as little manual changes of code as possible. But any suggestions are welcome, since I realize this might not be so easy.)