title: adding a custom view to uibarbuttonitem of a popover
body: <p>After reading apple's example: <a href="http://developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html" rel="nofollow">MultipleDetailViews</a> which demonstrates how to use <code>UIPopOverController</code> with two detail view controllers, I can't figure out how to add a custom view to the <code>barButtonItem</code> which exist in the <code>splitViewController</code> delegate method:</p>
  
  <pre><code>-(void)splitViewController:(UISplitViewController*)svc willHideViewController: (UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController:(UIPopoverController*)pc {
  
      self.popoverController = pc;
      barButtonItem.text = @"root view controller";
      self.rootPopoverButtonItem = barButtonItem;
  
      UIViewController &lt;SubstitutableDetailViewController&gt; *detailViewController = [mySplitViewController.viewControllers objectAtIndex:0];
      [detailViewController showRootPopoverButtonItem:self.rootPopoverButtonItem];
  }
  </code></pre>
  
  <p>the popover button works well with its default shape, but when I try something like this:</p>
  
  <pre><code>UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  UIImage *customImage = [UIImage imageNamed:@"popOver.png"];
  [button setBackgroundImage: [UIImage imageNamed:@"popOver.png"] forState:UIControlStateNormal];
  button.frame= CGRectMake(0.0, 0.0, customImage.size.width, customImage.size.height);
  [button addTarget:self action:@selector(???) forControlEvents:UIControlEventTouchUpInside];
  barButtonItem.customView = button;
  </code></pre>
  
  <p>I do not know what is the selector for this button that will get the popover to show correctly, my popover works well without a selector using the delegate methods of the <code>UISplitViewController</code>, so what kind of selector should I put here ?</p>