我使用带有自动检测电话号码的 WebView 。如果我在我的 iPad 上点击 WebView 中的电话链接,则会打开默认操作表,其中包含添加到联系人、复制和取消按钮。由于我没有引用菜单,当应用程序进入后台状态时,我该如何关闭此工作表?
最好的问候 卡斯滕
最佳答案
您可以尝试查看 UIWebView Development Document ,更重要的是 webView:shouldStartLoadWithRequest:navigationType:
您可以查看从此 stackoverflow 链接引用的 UIActionSheet 委托(delegate)函数 iPhone Detecting if a UIAlert UIActionSheet are open在委托(delegate)方法中,您可以看到
if ([view isKindOfClass:[UIActionSheet class]] && [[view buttonTitleAtIndex:0] isEqualToString:@"Call"]) {
// Dismiss actionSheet
}
另请参阅 UIActionSheet Class Reference 中的 dismissWithClickedButtonIndex:animated:
这可能会满足您在关闭方面的需求。
关于iphone - 关闭从 UIWebView 打开的 UIActionSheet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9110789/