
|
|
![]() 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. /** /** 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];
}
}
|