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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:40:16+00:00 2026-06-05T16:40:16+00:00

I have a single-view application that takes in a username and a password and

  • 0

I have a single-view application that takes in a username and a password and validates it with the server. After the credentials are validated, I would like the application to go to a different view, which will show some other data.

I only know how to switch views when I have a button (that is, by dragging it to the secondary view and selecting what kind of segue I want to use). But how do I change the view after the credentials are validated?

To give you a more clear idea, here is how my app currently functions:

Text is entered into two fields. Pressing the “Login” button (or the ‘done’ button on the keyboard) calls a method that validates the entered credentials. If the credentials are valid, then the add should move on. Otherwise, it will pop up a notification saying that the credentials are invalid.

I have everything completed and working. I just need to know how to change the view in the validation method after the given credentials are validated.

  • 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-05T16:40:18+00:00Added an answer on June 5, 2026 at 4:40 pm

    There are a number of ways to achieve this; the technique you choose should depend on if you want the validating view controller to “stay around” after you move on. If you want it to stick around, you can actually do it in much the same manner as your storyboard segues from buttons.

    In the storyboard, ctrl-drag from the first (validating) view controller to the second to create the segue. Select the segue and use the inspector panel to give it an identifier. Then in your code in the validating view controller, you can do something like this:

    [self performSegueWithIdentifier:@"validCredentialsSegue" sender:self];
    

    If you want the originating view controller to “go away”, you must look into the architecture of your application flow. Perhaps you want a master view controller “above” the credential’s one that is notified via delegation of the successful login and it decides what to do (maybe it’s view is the destination view anyway…). Otherwise, I think in the old days people fussed around with setting the window’s rootViewController property. I’m confident there are better techniques, though.

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

Sidebar

Related Questions

I have a single view application that only contains a web view and a
I have an ASP.NET MVC application that is using a single view to display
I have a View based application for iPhone/iPod that plays audio, having a VU
I have a client/server application that depends on MS SQL database for backend storage,
In an MVC style Ext JS 4 application, assuming I have a single controller/view/store/model
I have a simple single View application with a button in the main view
I would like to create a titlebar for my Sencha Touch application that persists
I have picker controls on a single view with two outlets for each. When
I have a single annotation on a map view. I can select it programmaticly,
I need to have various text view on a single line. And I want

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.