开发者

Have iPhone webpage URL open in specific view in application

I have an application that acts like an internet browser for one webpage. If the webpage is in one view, can I have it act so when a specific 开发者_开发问答URL is selected that it will open the URL in a different view?


Yes. In your webViewController, implement this

  • (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {

Check to see if it's the url you're interested in, then create and push a view that displays the web page.

Oh, and return NO to prevent the load from occurring in this view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜