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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:33:18+00:00 2026-06-09T14:33:18+00:00

i am trying to switch between two view controllers using storyboard. I create a

  • 0

i am trying to switch between two view controllers using storyboard. I create a modal seague by control-dragging (on buttons) from 1st view controller to 2nd, and then from the 2nd to the first.

So whenever I click on a button in 1st VC, it takes me to the 2nd VC. This time when i click the button on second VC, does it take me back to the original instance of the 1st VC or it creates a new instance?

If it takes me to the same instance, and user had written some data in some textfields, is there anyway to retain that on screen? (I might want to save them in some variables, and since the program will return back to the same instancem i’ll be able to get the variables back)

If it doesn’t take me to the same instance, is there any method to do so?

I tried making an instance of 2nd VC and using self.navigarionController push…(instance) but this doesn’t swtich the controller.

If i do this pushing using the storyboard, and i do pop in my 2nd VC, it doesn’t get popped either.

(and i would also couldn’t understand the difference between push,modal and custom seagues)

  • 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-09T14:33:19+00:00Added an answer on June 9, 2026 at 2:33 pm

    Create the modal segue from VC1’s button to VC2, but not the reverse one. When the VC2’s button is tapped, call dismissViewControllerAnimated:completion: to return to where you were.

    If you used a push segue instead, you would call popViewControllerAnimated: to go back but that only works if you have your view controllers managed by a UINavigationController.

    You can think of push as a way of stepping through a sequence of related scenes while modal is something that’s a bit out of the normal flow of the application. (That’s not a firm rule but it’s a starting point for deciding which way to go.) For ‘custom’, you write the segue code, so you decide what happens.

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

Sidebar

Related Questions

I'm trying to seamlessly switch between two independent HttpListener instances on the same address.
I want to switch between my two user controls AddUsers.xaml (user control) and Viewusers.xaml(user
I am trying to change or switch between two tabs that I have within
I'm trying to detect a swipe gesture to switch between two .xib files. Right
I'm trying to switch between two views right now. The problem is how it
I'm trying to use jquery to switch between three images once you click on
I'm trying to add an effect to a switch between 2 views. The switch
I'm trying to switch over to using app.yaml instead of web.xml and app-engine-web.xml. I've
I'm trying to switch from CellTable to DataGrid. The actual change was very easy
I have never code in Python and trying to switch from Javascrpt/SVG. Being confused

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.