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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:53:06+00:00 2026-06-12T01:53:06+00:00

I have a storyboard created with 2 views. ViewController1 and ViewController2. What I want

  • 0

I have a storyboard created with 2 views. ViewController1 and ViewController2. What I want to be able to do is after a user fills in specific fields and clicks the “Login” button on view1, is transition the user to view2.

I have the button successfully linked up to a method that executes when it is pressed I am just not sure how to do the transition.

  • 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-12T01:53:07+00:00Added an answer on June 12, 2026 at 1:53 am

    This is patterned off the standard IOS Utility template:

    1) In your storyboard, set up a Modal segue from view controller 1 to 2. Do this by control dragging from the view controller 1 icon (icon on the right at the bottom of your view controller) to view controller 2. Select modal as the transition type and give this segue an identifier such as ShowViewController2.

    2) In your implementation file for view controller 1, call this when the user presses Log In

    self.performSegueWithIdentifier("ShowViewController2", sender:self)
    

    Then implement prepareForSegue in viewController1 to set up viewController2:

    def prepareForSegue(segue, sender:sender)
        # call setters to pass data to the second view controller
    
        # set up a delegate pointer so that you can get back to VC1
        segue.destinationViewController.delegate = self
    end
    

    Also, implement a method in view controller 1 to be called when view controller 2 is done

    # Come back here when view controller 2 is done, for instance if the
    # user logs off.
    def view_controller_2_is_done(sender)
        self.dismissModalViewControllerAnimated(true)
    end
    

    For view controller 2, you’ll want to set up a setter for delegate with

    attr_accessor :delegate
    

    When it is time to return to view controller 1 (ie when the user logs out), call:

    @delegate.view_controller_2_is_done(self)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a UISegmentedControl with two segments using the interface builder (from storyboard),
I have a storyboard which contains views which simply refuse to change. If I
I did two sample applications in ios.Both applications i have done using storyboard.Then after
I created my app using StoryBoard. Then, I added objective-c class to have .h
I currently have a popover DatePickerViewController that I created in storyboard which has a
I have a UIViewController in storyboard that includes a scrollView. I want to put
I have following problem. I have created a tab based Application with three Views
I have 2 views controlled by a tab bar view controller created by the
I have a navigation controller I created in a storyboard. The forward and back
I have the following problem: I created a iOS 5 SDK application with Storyboard

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.