gpt4 book ai didi

ios - 我们可以在 cordova 中识别 UIGesture(在 cordova 中显示 native 侧边菜单的 native 手势)

转载 作者:行者123 更新时间:2023-11-29 10:29:48 25 4
gpt4 key购买 nike

我正在开发一个 iOS 项目,我想在其中使用 cordova 应用程序中的 native 侧边菜单。有什么方法可以使用 native 滑动手势来显示侧边菜单。

最佳答案

UIWebView 已经在使用 UIGestureRecognizers,因此您必须将此代码添加到添加手势识别器的类中

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES
}

正如 Stefan 所说,使用显示/隐藏 native 菜单的 javascript 滑动更容易/更好

或者你可以使用原生的UIScreenEdgePanGestureRecognizer ,因为现有的 UIWebView UIGestureRecognizers

不会有任何问题

关于ios - 我们可以在 cordova 中识别 UIGesture(在 cordova 中显示 native 侧边菜单的 native 手势),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30287263/

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