title: How to add a custom CalloutView loaded from nib file
body: <p>I'm trying to make a custom Callout view for AnnotationView. I had seen <a href="https://stackoverflow.com/a/6955392/810661">this answer</a>, and seems a good solution (it works). I'm trying to load a UIView from a nib file, and the UIView appears, but his buttons don't work, don't get pushed.</p>
  
  <p>Is there a way of doing this?? How can I load the UIView from a nib file and get the buttons working??
  Or maybe anyone help me finding a good solution.</p>
  
  <p>Thanks</p>
  
  <p>Here's the code I'm using:</p>
  
  <pre><code>- (void)setSelected:(BOOL)selected animated:(BOOL)animated
  {
      [super setSelected:selected animated:animated];
  
      if(selected)
      {
          //Add custom view to self...
          calloutView = [[[NSBundle mainBundle] loadNibNamed:@"MyCustomView" owner:self options:nil] objectAtIndex:0];
          [self addSubview:calloutView];
      }
      else
      {
          //Remove custom view...
          if (calloutView) {
              [calloutView removeFromSuperview];
          }
      }
  }
  </code></pre>
  
  <p>Thanks in advance </p>