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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:38:12+00:00 2026-06-08T11:38:12+00:00

In my iphone application I have two scenes, both of them are view controllers.

  • 0

In my iphone application I have two scenes, both of them are view controllers.
Normally initial scene is set to the first one. When user plays it passes to the second one.

At this point when the user closes the app and restarts it, if the user has already played, it should start with the second scene, so the initial scene should change for that user.

How can I do this?

And i dont use a navigation 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-08T11:38:14+00:00Added an answer on June 8, 2026 at 11:38 am

    If you are using xibs, you set this up in the app delegates
    applicationDidFinishLaunchingWithOptions.

    Create a global BOOL and check it’s value on applications launch, E.g:

    .h

    @class ViewController;
    @class SecondViewController;
    @interface AppDelegate : UIResponder <UIApplicationDelegate>
    @property (strong, nonatomic) UIWindow *window;
    @property (strong, nonatomic) ViewController *viewController;
    @property (strong, nonatomic) SecondViewController *SecondViewController;
    

    .m

    #import "ViewController.h"
    #import "SecondViewController.h"
    
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        // Override point for customization after application launch.
        if (isSecondViewControllerBool == YES) {
            self.SecondViewController = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
        }else{
            self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
        }
        self.window.rootViewController = self.viewController;
        [self.window makeKeyAndVisible];
        return YES;
    }
    

    For storyboards:

    In the first view controllers viewDidLoad.

    - (void)viewDidLoad
    {
        if (isSecondViewControllerBool == YES) {
            UIViewController *secondVC = [self.storyboard instantiateViewControllerWithIdentifier:@"mySecondViewController"];
            [self presentViewController:secondVC animated:NO completion:nil];
    
        }else{
            //present normally
        }
    }
    

    If you are using storyboards and have decided to use my xib solution, delete the storyboard from the project, and remove it here as well:

    enter image description here

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

Sidebar

Related Questions

I have an iphone application containing two views The first view have a button,
I have one view in iPhone application. In that view i added two UIImageView
hai all, in my iphone application i have a login view with two text
I have two view controllers: MyParentViewController and MyChildViewController . The application starts with MyParent
In My iphone application i have two XML files. I can parse one.xml eailsy
I have two targets in my iPhone application: one for my actual app, and
I'm developing an iPhone application that have a TabBarController with two tabs. Each tab
I have an Iphone application in which i am using two types of purchases.Non
I am very new to iPhone. I have developed two version of an application
I have some query. First of all let's have an iPhone application flow which

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.