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 7946165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:04:19+00:00 2026-06-04T01:04:19+00:00

I have a navbar with a bar buttonitem on it. how would I go

  • 0

I have a navbar with a bar buttonitem on it. how would I go about changing the selector on the first press. I basically want to have the first press trigger the “showMenuView” selector and then while that’s displayed change the barbuttonitem selector to be “hideMenuView”

here’s the code I have so far:

 UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"globe.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(showMenuView:)];

thanks for any help

  • 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-04T01:04:22+00:00Added an answer on June 4, 2026 at 1:04 am

    You could set a new action.

    [button setAction:@selector(hideMenuView:)];
    

    But I think it would be a better practice to use a toggleMenuView: method, have a BOOL variable indicating wether or not your menu is visible and then hide or show it in toggleMenuView:

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

Sidebar

Related Questions

I have a nav bar with children unordered lists nested under the main navbar
I want to have a nav bar set position: fixed to the top of
Basically, I am building a horizontal navigation bar. I have following markup: <ui:style src=../common.css
I have a navigationController which has a navigation bar. I would really like to
I have set a custom gradient color background for my nav bar. I want
i have an app that uses a navbar. What i want to acomplish is
I have a navbar with 4 elements in it. The first is just a
I am using twitter bootstrap and have a fixed nav bar. The navbar has
I have a navigation bar like this <div id=top data-role=navbar data-type=horizontal> <ul> <li><a href=#a>A</a></li>
I have the following navbar collapse: <button type=button class='btn btn-navbar' data-toggle='collapse' data-target='.nav-collapse'> <span class=icon-bar/>

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.