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

The Archive Base Latest Questions

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

I would like to take my users through a help wizard if it’s the

  • 0

I would like to take my users through a help wizard if it’s the first time they are using my app. My plan was to lookup the user defaults for a certain key. My question is what’s the best way of re-routing the initial view in an iPhone app ? Does it happen in the app delegate ?
Do I have to have a reroute in my first view controller? Should I call the setRootView in my initial view’s navigation controller? Is it done in the storyboard?

I am very confused and was wondering if there is a good way of doing so ?

I use IOS 5

Thanks so much,
Ross

  • 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-30T03:31:03+00:00Added an answer on May 30, 2026 at 3:31 am

    When using a userdefaults key on the first launch, its a good idea to override the initialize function in the AppDelegate. This will ensure that the user defaults key gets initialized to the correct value. For example, in one of my apps I am chaging to see if it is the first launch because I wan to display a welcome view controller to the user. I set this up using the following function in the AppDelegate.m file.

    + (void)initialize
    {
        if (![[NSUserDefaults standardUserDefaults] objectForKey:@"showWelcome"])  {
    
            NSString  *mainBundlePath = [[NSBundle mainBundle] bundlePath];
            NSString  *settingsPropertyListPath = [mainBundlePath
                                                   stringByAppendingPathComponent:@"Settings.bundle/Root.plist"];
    
            NSDictionary *settingsPropertyList = [NSDictionary 
                                                  dictionaryWithContentsOfFile:settingsPropertyListPath];
    
            NSMutableArray      *preferenceArray = [settingsPropertyList objectForKey:@"PreferenceSpecifiers"];
            NSMutableDictionary *registerableDictionary = [NSMutableDictionary dictionary];
    
            for (int i = 0; i < [preferenceArray count]; i++)  { 
                NSString  *key = [[preferenceArray objectAtIndex:i] objectForKey:@"Key"];
    
                if (key)  {
                    id  value = [[preferenceArray objectAtIndex:i] objectForKey:@"DefaultValue"];
                    [registerableDictionary setObject:value forKey:key];
                }
            }
    
            [[NSUserDefaults standardUserDefaults] registerDefaults:registerableDictionary]; 
            [[NSUserDefaults standardUserDefaults] synchronize]; 
        } 
    }
    

    In the – application:didFinishLaunchingWithOptions: I add a view controller as the root view controller. I like to always include a solid “Root View Controller” to do any sort of launch view switching. Doing it on the UIWindow subview level can be problematic. In RootViewController’s – viewDidLoad is where I check the user defaults for the key.

        if ([[NSUserDefaults standardUserDefaults]valueForKey:@"showWelcome"] == [NSNumber numberWithBool:YES]) {
            [self pushViewController:[[WelcomeViewController alloc]init] animated:NO];
        } else {
            [self pushViewController:[[OtherViewController alloc]init] animated:NO];
        }
    

    All this is tied back to a Bool YES/NO switch in the settings.bundle which allows the user to see the WelcomeController again if they want.

    SettingsBundle

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

Sidebar

Related Questions

Using Flex 3, I would like to take an image snapshot such as this:
Using sql server 2000, I would like to take my production data and put
I am working on a project using Groovy, and I would like to take
I want to show my first-time users different functions of my web-app. To do
I would like to take a pascal-cased string like CountOfWidgets and convert it into
I would like to take a stack of images (or potentially an array of
I would like to take a string representation of a set and parse it.
I would like to take a field and replace all characters that are not
What I would like to take ownership of a hid device that may already
I have two ICollection s of which I would like to take the union.

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.