• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSUserDefaults key validation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserDefaults key validation


  • Subject: Re: NSUserDefaults key validation
  • From: Kurt Revis <email@hidden>
  • Date: Fri, 16 Nov 2001 22:58:04 -0800

What I really need is a
method to check if a given key is valid(exists), but I don't see any such
method in the definition of NSUserDefualts.

What you want to do is to specify the "default" values of your defaults (!) sometime early in your app. Read the section "Set a default in the NSRegistrationDomain" in the NSUserDefaults documentation. The example there is pretty much exactly what you want to do.

(I could go into more detail but that should get you started...)

--
Kurt Revis
email@hidden


References: 
 >NSUserDefaults key validation (From: Dan Huntsinger <email@hidden>)

  • Prev by Date: &xxx; thingies
  • Next by Date: Help with Variable Scope
  • Previous by thread: Re: NSUserDefaults key validation
  • Next by thread: Re: NSUserDefaults key validation
  • Index(es):
    • Date
    • Thread