SimulateTouch
SimulateTouch copied to clipboard
Capture swipe and tap coordinate?
void handle_event (void* target, void* refcon, IOHIDServiceRef service, IOHIDEventRef event) { if (IOHIDEventGetType(event)==kIOHIDEventTypeDigitizer){ IOHIDFloat x=IOHIDEventGetFloatValue(event, (IOHIDEventField)kIOHIDEventFieldDigitizerX); IOHIDFloat y=IOHIDEventGetFloatValue(event, (IOHIDEventField)kIOHIDEventFieldDigitizerY); int width = [[UIScreen mainScreen] bounds].size.width; int height = [[UIScreen mainScreen] bounds].size.height; NSLog(@"click : %f, %f", x_width, y_height) ; } } I use this code .How can I judge subevent swipe or tap ?thank for all