FoneMonkey

In order to prevent the recording of spurious events, FoneMonkey, by default, filters various types of events for various components. For example, UIView by default only records UITouchPhaseEnded events.

To enable recording of additional events for a particular class, add a shouldRecordMonkeyTouch method to the class (or category).

For example, let's say you have a subclass of UIView called PaintingView that requires recording TouchBegin and TouchMoved events. You could add a category method to the class as follows:

#import "PaintingView.h"
@interface PaintingView (FMReady)

@end


@implementation PaintingView (FMReady)


- (BOOL) shouldRecordMonkeyTouch:(UITouch*)touch {
    return ([touch phase] && (UITouchPhaseBegan | UITouchPhaseMoved));
}

@end