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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:23:18+00:00 2026-06-01T07:23:18+00:00

I have a view on a storyboard the has a button to perform a

  • 0

I have a view on a storyboard the has a button to perform a certain action. To perform this action though, the user must be logged in. The button handler tests if the user is logged in and performs one segue if YES and another if NO. The NO segues pushes to a login view controller. There is another segue connecting back to the first view controller so if login is successfull the user can pick up where they left off. The view controllers are embedded in a navigation controller.

Problem is, the ‘return’ segue is loading a whole new instance of the view controller and not referencing the origional instance so I end up with empty interface elements and 2 copies of that view controller in memory.

How can I get back to the original instance of the view controller?

  • 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-01T07:23:19+00:00Added an answer on June 1, 2026 at 7:23 am

    Assuming by your use of “push” you mean that you are using a UINavigationController, then you can use the following to return to the top of the stack.

    [self.navigationController popToRootViewControllerAnimated:YES];
    

    or

    UIViewController *prevVC = [self.navigationController.viewControllers objectAtIndex:<n>];
    [self.navigationController popToViewController:prevVC animated:YES];
    

    to pop to a specific level where <n> is the level.

    or

    [self.navigationController popViewControllerAnimated:YES];
    

    If you just want to pop one level back up the navigation stack.

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

Sidebar

Related Questions

In my storyboard, I have a view as a splash screen. In this view,
I have a static table view, created using a storyboard. I want to get
I am using a storyboard and I have added iAd banner to my view.
I am building an app using storyboard. I have added a table view to
i have view like 'home/details/5', it can be access by anonymous user. but there
i have view controller which contains a button which show the image library ,if
I cannot seem to find this anywhere online. I have an add button in
I have a storyboard setup as a Tabbed Application with first view controller containing
Following setup causes trouble: In my storyboard I have a standard table view controller,
in my view, I have a button : <Button Style={StaticResource ButtonTextForwardStyle} Content=My Text Width=400

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.