views:

16

answers:

1

This use to work when i use in a viewbase app template

But when i use a UITabBarNavigation with 2 views didn't work :S ??

-(void)viewDidLoad{
  [self.infoweb loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.myserver.com/info.php"]]];
  self.infoweb.delegate = self;
}


-(BOOL)infoweb:(UIWebView *)infoweb shouldStartLoadWithRequest:(NSURLRequest *)request 
                                                navigationType:(UIWebViewNavigationType)navigationType
{   
  NSString *host = request.URL.host;
  if([host isEqualToString:@"myServerApp"])
  {
    NSString *command = request.URL.path.lastPathComponent;
    if([command isEqualToString:@"chargeInfo"])
    {
      NSLog(@"Info to nslog...");
    }
    return NO;
  }
  return YES;
}

Can somebody understand me :) and help me i have 2 views and 2 controleres this code goes on the second, my web load fine but the problem is that didnt shouldStartLoadWithRequest didnt work 8-) help!!

In my interface bulder i make the connection with the files owner (webview-filesowner)

A: 

Problem solved :P

-(BOOL)webView:(UIWebView *)infoweb....

SAM