FoneMonkey

For UIControls, you may prefer to record control rather than touch events. For example, you may be interested in recording value change events instead of or in addition to touch events. You can override the following UIControl methods for this purpose.

/**
 The events to be recorded for this UIControl class. Defaults to none.
 */
- (UIControlEvents)monkeyEventsToHandle;

/**
 Prepare a UIControlEvent event for recording.
 */
- (void) handleMonkeyEventFromSender:(id)sender forEvent:(UIEvent*)event;

 Example

- (UIControlEvents)monkeyEventsToHandle {
    return UIControlEventEditingDidEnd;
}   

- (void) handleMonkeyEventFromSender:(id)sender forEvent:(UIEvent*)event {

    if (!self.editing && self.text != nil) {
        [FoneMonkeyAPI record:self command:FMCommandInputText 
                         args:[NSArray arrayWithObject:[self.text copy]]];
    } else {
        [FoneMonkeyAPI continueRecording];
    }

}