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

  • Home
  • SEARCH
  • 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 8187561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:36:01+00:00 2026-06-07T02:36:01+00:00

I have a split view app. In portrait mode, the menu would disappear after

  • 0

I have a split view app. In portrait mode, the menu would disappear after it was clicked. To fix this I have added a new button, which is just supposed to display the menu:

- (void)viewDidLoad {
    [super viewDidLoad];

    // FORM LIST button was dissapearing, this adds it back everytime
    UIBarButtonItem *btnMenu = [[UIBarButtonItem alloc]initWithTitle:@"Forms List" style:UIBarButtonItemStyleBordered target:self action:@selector(showMenu:)];
    self.navigationItem.leftBarButtonItem = btnMenu;

}

Which appears every time I load that view up. My problem is that I am getting an error:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DetailViewController showMenu:]: unrecognized selector sent to instance 0x9d58810

I am pretty certain that the problem is with this line:

UIBarButtonItem *btnMenu = [[UIBarButtonItem alloc]initWithTitle:@"Forms List" style:UIBarButtonItemStyleBordered target:self action:@selector(showMenu:)];

My questions are:
(1) Is showMenu: the appropriate method?
(2) What is the target supposed to be?

Thanks.

  • 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-07T02:36:03+00:00Added an answer on June 7, 2026 at 2:36 am

    Thanks to all of you I have found multiple problems with my code.

    (1) I thought showMenu was a built in function, and do not had it declared anywhere in my program.

    (2) I did not know how the target or action worked.

    Thanks guys (girls?) !

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

Sidebar

Related Questions

In my app i have added tabBarController in split View's RootViewController.In that portrait mode
Two similar questions have been asked here before: Split view in portrait mode! Forcing
I have made a new split view iPad app using CoreData. All I have
I have been trying to add/implement this example to my existing Split View app
I have added the split view controller on a view controller as this: rootViewController
I have a split view based app, and would like to listen for some
I am creating a split view ipad app. I have four buttons in the
I have an app that I just got setup with a split view controller
I have an app that needs backgrounds for both parts of the split view.
I have a split view app running fine on the iPad. It is using

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.