Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8484845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:29:02+00:00 2026-06-10T20:29:02+00:00

I am using the FPPopover class which creates popups for iPhones. I followed the

  • 0

I am using the FPPopover 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:

Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[UIBarButtonItem superview]: unrecognized selector sent to instance 0x6a3e420’

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*)

-(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];
}

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?

One more note just in case: This is how I programmatically created the navigation bar along with the bar button:

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;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:29:04+00:00Added an answer on June 10, 2026 at 8:29 pm

    the presentPopoverFromView is only accepting a UIView subclass. UIBarButtonItem is not a subclass of UIView, so you need to find the view related to that button item. This is the solution I’m using with FPPopoverController

        UIBarButtonItem *buttonItem = sender;
        UIView* btnView = [buttonItem valueForKey:@"view"];
        //On these cases is better to specify the arrow direction
        [popover setArrowDirection:FPPopoverArrowDirectionUp];
        [popover presentPopoverFromView:btnView];
    

    This should work! Let me know!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using C#.NET, i wrote a toolbar which is stored now into toolbar.cs file. I
Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
Using Trigger.io's barcode api in an application that only contains boilerplate HTML and the
Using C# How can I show a document in richtextbox without scrollbars, But I
Using the DateTime class, if I try to run the following code: $mydate =
Using SSRS 2008 R2 I have a background process that dynamically generates RDL for
Using Python, I'm trying to connect to my AppEngine app's remote_api handler, but I
Using JNotify in project and it fulfill my all requirements, but some times it
Using JAXB in Java it is easy to generate from a xml schema file
Using Rails 3, but I guess doesn't matter. I put this in the template

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.