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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:43:37+00:00 2026-05-28T18:43:37+00:00

Hello everyone I would have a value for the need to save every time

  • 0

Hello everyone I would have a value for the need to save every time I press a button (count), virtually every time a user presses a button in my app should be pressed to keep count of the times (1,2,3,4, etc. etc.) the problem is that that data would be permanently saved, that is, even when you exit the app or restart the device should be saved on the iphone to find it and increase it reopened after the application.
Is there an easier way to CoreData or SqlLite to do this?

thanks

  • 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-28T18:43:38+00:00Added an answer on May 28, 2026 at 6:43 pm

    The easiest way would be use NSUserDefaults to do this, no need for a bigger data store if it’s only an integer.

    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    
    int buttonCount = 0;
    
    // Do you count somewhere and add to buttonCount
    
    [defaults setObject:[NSNumber numberWithInt:buttonCount] forKey:@"buttonPress"];
    

    and to retrieve to number back just use

    int buttonPress = [[[NSUserDefaults standardUserDefaults] objectForKey:@"buttonPress"] intValue];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone and thank you for your time. I would just like to say
Hello everyone Masters Of Web Delevopment :) I have a piece of PHP script
Hello everyone i currently have this: import feedparser d = feedparser.parse('http://store.steampowered.com/feeds/news.xml') for i in
Introduction : Hello Everyone, I have been looking for days for a way to
Hello everyone I have a question that I will describe as good as I
Hello everyone! I have a website which is http://www.urbanelementz.ca ... It's currently in development.
Hello everyone and thank you very much for your time. Basically what I am
Hello everyone I have converted a project in C# to F# that paints the
Hello everyone I have error which breaks up my build for no reason, here
Some details XAMPP 1.7.1 OS tested on vista and xp Hello everyone. I have

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.