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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:11:02+00:00 2026-05-28T03:11:02+00:00

One would think I can easily find an answer to this question, and perhaps

  • 0

One would think I can easily find an answer to this question, and perhaps I missed it, but here goes.

My app contains a few views of which the main view displays a bunch of information it progressively collects from a user, the mic and and the camera through the other views. It is all supposed to end with one big climactic “submit button.” At that point the data gets safely stored (currently in an sql database… but that’s another story).

Once that is done, I want the whole process to start over which means reinitializing the view to a virgin state. In android, I can throw a new intent and destroy the old one.

I gather I’m supposed to start with the app delegate (see code below). Now the question is, where do I go from here?

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.mainViewController = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil];
    self.window.rootViewController = self.mainViewController;
    self.mainViewController.managedObjectContext = self.managedObjectContext;

    [self.window makeKeyAndVisible];
    return YES;
}
  • 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-05-28T03:11:03+00:00Added an answer on May 28, 2026 at 3:11 am

    So after a fair share of digging around, and trial and error. I found something that works the way I want it to.

    I created a special function in the app delegate which executes the following:

    - (void) newScreen
    {
        self.mainViewController = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil];
        self.window.rootViewController = self.mainViewController;
        self.mainViewController.managedObjectContext = self.managedObjectContext;
    }
    

    Then from main view controller, I call that function

    [(AppDelegate *)[[UIApplication sharedApplication] delegate] newScreen];
    

    Easy as pie…

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

Sidebar

Related Questions

How can I force validation when user clicks button? One would think this should
My problem is one that you would think is quite common, but I haven't
My question is a lot like this one . However I'm on MySQL and
I find this answer and this wiki page to be excellent introductions to memoization
I know this kind of question was asked before, but I cannot for the
I think I might be on the wrong track here so I'm posting this
I've been pondering this question for a while: Can you build a faster fundamental
Why one would use one of the following packages instead of the other? Java
In perl one would simply do the following to store and iterate over a
I am curious which one would be better fitting as a currency field ?

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.