title: Objective C Calling Method on Another Class
body: <p>I have 2 classes, <code>MainViewController</code> and 'FooView' for example.</p>
  
  <p>In MainViewController I have a method called <code>-(void)doSearch</code></p>
  
  <p>I'm trying to call <code>doSearch</code> from Foo, is see in the log "doSearch" (NSLog) but the UIWebView doesn't response.</p>
  
  <p><strong>Foo</strong></p>
  
  <pre><code>MainViewController *mainVc = [[MainViewController alloc] init];
  [mainVc doSearch];
  </code></pre>
  
  <p><strong>MainViewController</strong></p>
  
  <pre><code>
  - (void)doSearch {
      NSLog(@"doSearch");
      [myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com/"]]];
  }
  </code></pre>
  
  <p>myWebView is a UIWebView.</p>
  
  <p>Thanks,</p>
  
  <p>Guy Dor</p>