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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:52:06+00:00 2026-06-03T04:52:06+00:00

In my iOS app, I have four UIViewController s, and for the sake of

  • 0

In my iOS app, I have four UIViewControllers, and for the sake of argument let’s call them 1, 2, 3, and 4. I have segues leading from one to the next progressively (1->2, 2->3, 3->4). However, in 4 I want there to be a button that can segue back to one. I only pictured one way of doing this, but I couldn’t figure out how to implement it…

This way would be to have a segue directly connecting 4->1, and when the segue is called delete 2 and 3 from memory (otherwise the user could keep building up UIViewControllers since none of them are being removed). I don’t know how to delete them from memory since I don’t have any variables pointing to them (that is, they were created when their respective segues were called, so as far as I know I don’t have direct access to them).

I don’t know if that’s the best way, but if you can figure out how to do that (or a better way), any help is appreciated 🙂

  • 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-03T04:52:08+00:00Added an answer on June 3, 2026 at 4:52 am

    You need to use a UINavigationController if you aren’t already.

    Then in your 4th view you just need a button with a selector that does the following:

    - (IBAction)goBackToFirstView:(id)sender {
        [self.navigationController popToRootViewControllerAnimated:YES];
    }
    

    This will handle all your memory for you and send you back to the first view controller by popping everything else off the stack.

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

Sidebar

Related Questions

In my iOS app i have one view controller that handles my main view.
I have an iOS app which gets some JSON from a server (in the
Let's say I have an existing IOS app live on Appstore which is version
I am writing an iOS app and I have one question to make the
In my iOS app I have several UIElement s that can process user input:
I'm building an iOS app and I have all the functionality going already so
Overview I have an iOS app which sends local notifications at specific dates. I
I have an iOS app sending requests to a PHP based web service ,
I have an iOS app that uses a number of enums for valid values,
I have an iOS app with a UITableView that has flexible width, which allow

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.