Reputation: 1
I'm new to iPhone development, I have an application in which I insert an HTML
page (inserted locally in UIWebView
) containing a summary, in this page there are links(href), when I click on a link its content is displayed in the same UIWebView
but I want to keep the page containing the summary in the first UIWebView
at left and display the contents of the link in a new UIWebView
at right. I know from what I read that I should insert the method shouldStartWithLoad:
in the delegate.m but I do not know exactly how to use this method for my case.
Can you tell me how to do it? Is there a tutorial that explains this clearly?
Upvotes: 0
Views: 742
Reputation: 3400
Using the uiwebviewDelegate method
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;
if you pick the [request.URL absoluteString], then you can make your logic depending on the the url. You need then to return NO.
By the way UIWebView take huge amount of ram, so you should take care.
Upvotes: 1