title: iPhone: Error when using the FPPopover class when using it with a UIBarButtonItem
body: <p>I am using the <a href="https://github.com/50pixels/FPPopover" rel="noreferrer">FPPopover</a> class which creates popups for iPhones.
  I followed the exact steps that are in the readme file but instead of using a UIbutton from a xib file, I am using a UIBarButtonItem created programmatically. But, I get the following error:</p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIBarButtonItem superview]: unrecognized selector sent to instance 0x6a3e420'</p>
  </blockquote>
  
  <p>I copy pasted the same code as in the readme file but I just changed the (UIButton*)okButton with (id)sender  (id here is UIBarButtonItem*)</p>
  
  <pre><code>-(void)popover:(id)sender
  {
      //the view controller you want to present as popover
      TestClass *controller = [[TestClass alloc] init];
      //our popover
      FPPopoverController *popover = [[FPPopoverController alloc] initWithViewController:controller];
      //the popover will be presented from the okButton view
      [popover presentPopoverFromView:sender];
      //release
      [controller release];
  }
  </code></pre>
  
  <p>I was thinking maybe it has to do with the UIBarButtonItem which is not a UIButton? Or is it anything else? I tried converting the UIBarButtonItem into UIButton but still gave me the same error. Any solutions to it?</p>
  
  <p>One more note just in case: This is how I programmatically created the navigation bar along with the bar button:</p>
  
  <pre><code>UINavigationBar *navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(320, 0, 320, 44)];
  UINavigationItem *navItem = [[UINavigationItem alloc] initWithTitle:@"By Clubs"];
  [navBar pushNavigationItem:navItem animated:NO];
  UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:@"Filter"
                                                 style:UIBarButtonItemStyleBordered
                                                target:self
                                                action:@selector(popover:)];
  
  
  navItem.rightBarButtonItem = editButton;
  </code></pre>