Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在我在我的 webview 中显示来自 web 的 swf,但是当我单击 swf 中的 url 地址以使用我的默认 web 浏览器显示另一个页面时,我发现 webveiw 阻止这样做,为什么?如何允许?非常感谢!
你应该看看WebUIDelegate协议,特别是这个委托方法:
WebUIDelegate
- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request;
如果您已将对象注册为WebView的 UI 委托,则当 Flash 插件发送 URL 更改请求时会调用此方法。然后,您可以对请求做您想做的事情。默认情况下,WebView只是忽略它。
WebView