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

  • Home
  • SEARCH
  • 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 8597627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:57:19+00:00 2026-06-12T00:57:19+00:00

Im having two textfields , profile name profile quote In my application home screen,I

  • 0

Im having two textfields ,

  1. profile name
  2. profile quote

In my application home screen,I want to show an alert view “Create a Profile” on first launch.And if in next launch profile is exist it should not show the alert view?Can any one help me to code?

  • 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-12T00:57:20+00:00Added an answer on June 12, 2026 at 12:57 am

    Okay, I needed to do this same thing. I created a singleton class which I used to store NSUserDefaults.

    I called it my defaults class.

    Defaults.h

    #import <Foundation/Foundation.h>
    
    @interface Defaults : NSObject
    {
    
    }
    @property(atomic,assign) int numberOfLaunches; 
    +(Defaults*) currentDefaults;
    +(Defaults*) defs;
    

    Defaults.m

    #import "Defaults.h"
    #include "SynthesizeSingleton.h"
    @implementation Defaults
    
    SYNTHESIZE_SINGLETON_FOR_CLASS(Defaults)
    
    +(Defaults*) defs
    {
    return [Defaults currentDefaults];
    }
    
    -(int) numberOfLaunches
    {
        return [[NSUserDefaults standardUserDefaults] integerForKey:@"number_of_launches"];
    }
    -(void) setNumberOfLaunches:(int)numOfLaunch
    {
        [[NSUserDefaults standardUserDefaults] setInteger:numOfLaunch forKey:@"number_of_launches"];
    }
    

    –Now just import the defaults class into whichever class you want to use it in.

    if([Defaults defs].numberOfLaunches < 1)
        {                                                      
                [Defaults defs].numberOfLaunches++;
                //Perform whatever alertView action your wanting to do
    
                  UIAlertView *alertV=[[UIAlertView alloc]initWithTitle:NSLocalizedString(@"FIrst Launch",NULL) message:NSLocalizedString(@"This is the apps first launch",NULL) delegate:nil cancelButtonTitle:NSLocalizedString(@"Okay",NULL) otherButtonTitles:nil];
            [alertV show];
            [alertV release];
    
    
       }
    

    //If you want to know which button they press, you need to adopt the UIAlertViewDelegate

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

Sidebar

Related Questions

I am having two issues: I usually create separate view for the login to
My layout having two parts. I want to change the upper part by keeping
I'm having two jquery's that I run and I want to combine them both
Having two lists of same object type. I want to join them using an
I'm having two sortable lists where I can add items from the first list
I have a jsp page having two text field id and name. Now I
there are two dataobject classes A and B having one-to-many relationship. I want to
I have one problem with two sections in UITableview grouped style. First section having
I am having two text fields From, To.Here i want to do many things
i am having two textfields,fromdate and todate.how to get different dates from the same

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.