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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:57:19+00:00 2026-06-05T05:57:19+00:00

I have created several scenes within a storyboard file in my Xcode project, and

  • 0

I have created several scenes within a storyboard file in my Xcode project, and the first scene that is loaded is a user login in screen. When a user logs in the UIButton “Login” takes the user to the welcome screen. I setup that in storyboard using a modal segue. I want a user with the name “admin” to be taken a welcome admin screen. I’m pretty sure it’s only possible to have one segue associated with one object, i.e. UIButton in storyboard, so I am stumped as to how I can accomplish the login to take the admin to the admin welcome screen, and take all other users to the user welcome screen. I really don’t want to create two separate login buttons, so that’s not an option.

I came across some stackoverflow posts with similar questions but all the answers seemed a little convoluted. Keep in mind I am new to Xcode, so if you paste code in your answer please specify which file the code should go in (that would help me out A LOT). I’ll post a picture of what my storyboard looks like so far to help demonstrate a visual diagram of what I am talking about.

enter image description here

  • 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-05T05:57:20+00:00Added an answer on June 5, 2026 at 5:57 am

    If I understood your question correctly, here are the steps you need to take to make it work:

    1. From the WelcomeViewController – where you have the username / password login button, control+drag from the UIViewController to the WelcomeScreen, and choose Modal from the pop up menu (By drag from UIViewController I mean, select the UIViewController in storyboard, there is a round shape icon on the bottom, from that to the destination view controller). Name the segue identifier as “UserSegue”

    2. Repeat step 1, but instead control+drag it to Admin screen. Name the segue identifier as “AdminSegue”

    3. You need now to subclass WelcomeViewController,

    4. Implement -(IBAction)login:(id)sender

      - (IBAction)login:(id)sender {
      
          // assuming you have hooked up the user name text field
      
          if ([self.usernameTextField.text isEqualToString:@"admin"]) {
              [self performSegueWithIdentifier:@"AdminSegue" sender:sender];
          }
          else {
              [self performSegueWithIdentifier:@"UserSegue" sender:sender];
          }
      }
      
    5. In storyboard, hook up the login button to the method in step 4.

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

Sidebar

Related Questions

I have created a file argument.pl which takes several arguments first of which should
I have created several user-defined build settings in Xcode 4.3.1. I no longer need
We have an ADP project created several years ago using Access 2000. This project
I have created login page forced login in several pages. Now i need to
I have several boxes (more than 100) that will be created dynamically in different
I have several buttons on my app that are being created dynamically. They are
I have created several custom attributes for my products. I have some that need
I have created several files with unit tests on existing classes in NetBeans project.
I have created several websites that run from ISAPI dll's, which runs smoothly in
I've come across a place in my current project where I have created several

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.