TheZimm
Mar 18, 2009, 08:48 PM
It isn't working, can anyone see why?
- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request
navigationType:(UIWebViewNavigationType)navigationType {
if (navigationType == UIWebViewNavigationTypeLinkClicked) {
NSURL *URL = [request URL];
if ([[URL scheme] isEqualToString:@"http://"]) {
[addressBar setText:[URL absoluteString]];
[self gotoAddress:nil];
}
return NO;
}
return YES;
}
I have gotoAddress named up in the code, and that works because on load it sets a string that has a url to be a NSURL which then goes through my gotoAddress action with that NSURL. If that makes sense?
Zym
- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request
navigationType:(UIWebViewNavigationType)navigationType {
if (navigationType == UIWebViewNavigationTypeLinkClicked) {
NSURL *URL = [request URL];
if ([[URL scheme] isEqualToString:@"http://"]) {
[addressBar setText:[URL absoluteString]];
[self gotoAddress:nil];
}
return NO;
}
return YES;
}
I have gotoAddress named up in the code, and that works because on load it sets a string that has a url to be a NSURL which then goes through my gotoAddress action with that NSURL. If that makes sense?
Zym
