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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:46:17+00:00 2026-05-19T15:46:17+00:00

I have a login page in my application with two users-Administrator and Standard. On

  • 0

I have a login page in my application with two users-Administrator and Standard. On successful login, we get to the welcome page, where a pop up button is present. I want to disable the 3rd and the 4th menu items in the pop up button menu for the standard user.
For Administrator, all the menu items should be available.
I want this distinction based on the user’s selection on the login page.
Please help me, how i can achieve this?
Do i have to use KVC concepts? If yes, how?

Thanks in advance..

  • 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-05-19T15:46:17+00:00Added an answer on May 19, 2026 at 3:46 pm

    You need to do two things here.

    1. To disable your third and fourth menu items, you need to set their enabled property to NO.

      [[yourPopUpButton itemAtIndex:2] setEnabled:NO];
      [[yourPopUpButton itemAtIndex:3] setEnabled:NO];
      
    2. Set autoenablesItems property of NSPopUpButton to NO.

      [yourPopUpButton setAutoenablesItems:NO];
      

      If you don’t set this, the menu items will be automatically enabled when you click the pop up button, even though you disable them using Step 1.

    Do these things in the -(void)awakeFromNib method.


    For storing the login data to a persistent storage, you can use NSUserDefaults. For example.

    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; // LINE 1: create userDefaults instance
    [userDefaults setObject:@"enteredUserType" forKey:@"UserType"]; // LINE 2: store a value
    NSString *userType = [userDefaults objectForKey:@"UserType"]; // LINE 3: retrieve the value
    

    Here, UserType is a user defined Key. You can define any key you want.

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

Sidebar

Related Questions

I have an application I would like to force SSL on the login page
Ok simple question. I have a JSF application, containing a login page. The problem
I have made a web application that uses master page for Login & Logout
Normally we have login page with username, password filed and signin button. Using the
I have a login page written in classic asp. I want to set the
I have two pages load at beginning, login page and register page. Register page
I currently have a html login page which has two textfields for e-mail address
i have one login.jsp web page where i have two textboxes for username and
In my application I have two tables: Users and Profiles. A user has a
I have a Login page that captures User input like this. MD5calc ss =

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.