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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:25:33+00:00 2026-06-12T14:25:33+00:00

I have read and understand the way NSUserDefaults can be used to save preferences

  • 0

I have read and understand the way NSUserDefaults can be used to save preferences for my app to the file system. I am also aware of the need to register defaults before using them later in the app.

What I am not sure of, however, is if it is okay to register defaults from various classes in my app. For example, in the AppDelegate I want to register a preference that belongs to the entire app, but in a Theme-class I want to use (and therefore register) preferences only used for getting and setting the app’s theme. More classes will have their own needs as far as user defaults go, so this applies to multiple parts of any project I work on.

Is this way of keeping the preferences with the classes they belong to the correct way of working?

  • 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-12T14:25:34+00:00Added an answer on June 12, 2026 at 2:25 pm

    Yes, you can register defaults from multiple classes. When you register a new default, it just adds that new key/value pair to the registration domain (there is only one of those for the app). I think the way you’re doing it is quite reasonable.

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

Sidebar

Related Questions

From what I have read, and the way I understand how memory structures work,
I have read about session fixation and from what I understand it forces a
I have read about LDAP on wikipedia and I kind of understand what it
I have read quite a few selcet+update questions in here but cannot understand how
I have read about application object in android site but I couldn't understand. What
I have read up on it a bit and I understand that in java
I have read the explanation in http://en.wikipedia.org/wiki/PageRank and i understand that the page rank
I have read about the different types of reference. I understand how strong, soft
I have read plenty of C# examples of Value Objects, and I understand that
I have read the document Authentication (official from Facebook). I still don't understand the

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.