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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:09:36+00:00 2026-05-23T07:09:36+00:00

I will like my application that always starts as the first time I open

  • 0

I will like my application that always starts as the first time I open it. I have several view controllers and when I exit my application and I open it again I see the view controller where I left of. Maybe I have to call the method applicationWillTerminate method.

I use this code to open a new view:

 UIViewController *control = [[SomeViewController alloc] initWithNibName:@"SomeViewController"
                                                                            bundle:nil];
UINavigationController *navControl = [[UINavigationController alloc]
                                      initWithRootViewController:control];

[self presentModalViewController:navControl animated:NO];

[navControl setNavigationBarHidden:YES];

[control release];
[navControl release];

this code works great when linking it to buttons. But when I place that code in the applicationDidBecomeActive method it does not work.

  • 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-23T07:09:36+00:00Added an answer on May 23, 2026 at 7:09 am

    The easiest way is to set UIApplicationExitsOnSuspend in Info.plist.

    That really isn’t the expected behaviour, though. Users expect to see the app “where they left off”, especially if they’ve only briefly left the app (e.g. because they got a phone call).

    Your code snippet adds a view controller, but is unlikely to work since your app delegate is not a UIViewController. It also doesn’t do anything about removing the old view controllers.

    EDIT: If all you need to do is display a splash screen (or something), then it’s something like this:

    • In -applicationDidEnterBackground:, add a “splash screen” view (not a view controller) to self.window. (iOS takes a “screenshot” after you return from -applicationDidEnterBackground: and uses this in the app-switch animation; you want this to be what the user sees when switching back to your app)
    • In -applicationWillEnterForeground:, do whatever animations you want and eventually remove the view from the window (call -removeFromSuperview).

    EDIT 2: The same will work in -applicationWillResignActive:/-applicationWillBecomeActive:, except this happens on a sleep/wake event, which might not be what you want…

    I’d avoid using view controllers for this, because trying to shoehorn a view controller in the view controller hierarchy is likely to be problematic (for example, you have to figure out which VC to present it from, and you have to do the “right thing” if the user backgrounds your app while the VC is on screen, and…)

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

Sidebar

Related Questions

I'm working on an application that will have attachments, and I would like to
I have an .NET application that always starts itself with its border style to
I would like to build an application that will run on a web, this
I would like to write an application that will copy MP3 files to a
I'd like to use use maps in my application, so that there will be
I'd like to add a drop-down list to a Windows application. It will have
I would like to have a layered window that is always-on-top, which I can
I have a java application that will run on Windows 7 (using Swing, App
guys! I have follow question. I am writing an application that will track movement
Like many web applications (business) the customer wants a form that will search across

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.