0

我通过使用打开一个网站UIWebview,但有时当我点击一个按钮或一个链接时,它会自动调用一个不相关的网站。例如,当我单击 Facebook 链接时,它会直接进入 App Store 并询问 Facebook 安装过程(即使已安装 Facebook 应用程序)。之后我无法返回我的应用程序。所以我必须退出并重新打开我的应用程序。

  • 为什么即使已经安装了 Facebook 应用程序,它也会转移到 App Store?
  • 是否有可能向 App Store 添加后退选项?

代码:

webviews.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal;
[webviews loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"URL of the web site"]]];
webviews.scalesPageToFit =YES;  
4

1 回答 1

0

您可以使用 UIWebview 委托来控制 webview 可以或不能打开的内容(检查 ....shouldStartLoadWithRequest:...) http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebViewDelegate_Protocol /参考/参考.html

于 2013-06-21T10:49:23.783 回答