关于SimulateTouch,求用过的大神指点一下

下载了最新的SimulateTouch.h文件和libsimulatetouch.dylib库,添加到我自己的Logos Tweak工程中,编译是通过了,但是并没有触发点击,下面是主要代码

%hook SpringBoard

- (void)applicationDidFinishLaunching:(id)application
{
    %orig;
    [self performSelector:@selector(touch66) withObject:nil afterDelay:4];
}

%new
- (void)touch66
{
    CGPoint touchPoint = CGPointMake(26, 36);
    int r = [SimulateTouch simulateTouch:0 atPoint:touchPoint withType:STTouchDown];
        r = [SimulateTouch simulateTouch:r atPoint:touchPoint withType:STTouchUp];
//    NSLog(@"r === %d",r);
    [self performSelector:@selector(touch66) withObject:nil afterDelay:4];
}

%end

我的机器是5s 系统是8.1.2

有没有人用过呀?今天公司没有活,在线等 谢谢

LZ解决了吗?我遇到了同样的问题,编译通过了,但是没有任何反应

楼上的有解决吗?

1 个赞