title: UIAlertView delegate method crashing
body: <p>In my iPhone app, I have a <code>NSObject</code>A class and a <code>UIViewController</code> B class. I want to call a instance method in B class from A. I used the following code. </p>
  
  <pre><code>Bclass *vc = [[Bclass alloc]init];
  [vc hideAlert:NSString];
  [vc release];
  </code></pre>
  
  <p>and in B class:</p>
  
  <pre><code>- (void)hideAlert:(NSString*)message{
      UIAlertView *shareAlrt = [[UIAlertView alloc] initWithTitle:@""
                                                          message:message
                                                         delegate:self
                                                cancelButtonTitle:@"Ok"
                                                otherButtonTitles:nil];
      [shareAlrt show];
      [shareAlrt release];
  }
  </code></pre>
  
  <p>and the method called and show a AlertView. When click on the Ok button, I want to navigate to class Cclass.</p>
  
  <pre><code>- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
  {
      if (buttonIndex == 0)
      {
          Cclass *vc = [[Cclass alloc]initWithNibName:@"Cclass" bundle:[NSBundle mainBundle]];
          [self presentModalViewController:vc animated:NO];
          [vc release];
      }
  }
  </code></pre>
  
  <p>But when I click on the Ok button, the app crashes. Whats happening here? I have added <code>&lt;UIAlertViewDelegate&gt;</code> in the B class.h file, but still the same error. Please help</p>
  
  <p>I am getting the error code <code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType alertView:clickedButtonAtIndex:]: unrecognized selector sent to instance 0x81baa80'</code></p>