gpt4 book ai didi

iphone - UIWebview 手势 iOS

转载 作者:行者123 更新时间:2023-11-28 19:16:33 29 4
gpt4 key购买 nike

如何在 UIWebview 中识别用户 touchtapdouble tap。是否有可用的代表,例如触摸开始等?

最佳答案

这是在webview上实现单击和双击的代码

UITapGestureRecognizer *singleTap = [[[UITapGestureRecognizer alloc] initWithTarget: self action:@selector(doSingleTap)] autorelease];
singleTap.numberOfTapsRequired = 1;
[self.myWebView addGestureRecognizer:singleTap];


UITapGestureRecognizer *doubleTap = [[[UITapGestureRecognizer alloc] initWithTarget: self action:@selector(doDoubleTap)] autorelease];
doubleTap.numberOfTapsRequired = 2;
[self.myWebView addGestureRecognizer:doubleTap];

关于iphone - UIWebview 手势 iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11718821/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com