我使用自动检测电话号码的web视图。如果我在iPad的web视图中点击电话链接,则会打开默认的操作表单,其中包含add to contacts、copy和cancel按钮。由于我没有对菜单的引用,当应用程序进入后台状态时,我如何取消此工作表?
向Carsten致以最好的问候
发布于 2012-04-25 02:11:56
您可以尝试查看UIWebView Development Document,更重要的是webView:shouldStartLoadWithRequest:navigationType:,您可以查看从此堆栈溢出链接iPhone Detecting if a UIAlert UIActionSheet are open引用的UIActionSheet委托函数,在委托方法中,您可以看到
if ([view isKindOfClass:[UIActionSheet class]] && [[view buttonTitleAtIndex:0] isEqualToString:@"Call"]) {
// Dismiss actionSheet
}另外,看看UIActionSheet Class Reference中的dismissWithClickedButtonIndex:animated:,它可能会在关闭方面做您想要做的事情。
https://stackoverflow.com/questions/9110789
复制相似问题