SimulateTouch icon indicating copy to clipboard operation
SimulateTouch copied to clipboard

Capture swipe and tap coordinate?

Open zhenghx1105 opened this issue 10 years ago • 0 comments

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

zhenghx1105 avatar Mar 16 '15 07:03 zhenghx1105