Graphics Programs Reference
In-Depth Information
Delete the application from your device to remove the previously saved preferences.
Then, build and run again. The first time the application launches, the default satellite map
will be displayed. If you change the map type, the preference is added to the application
domain, and your application will use that value from then on. The default value in the re-
gistration domain will be ignored.
NSUserDefaults is a simple class but a useful one. In addition to storing preferences,
many developers use NSUserDefaults to store little pieces of information that are im-
portant but don't really need to be kept in distinct files. For example, if you want to dis-
play an alert to a user every 3rd time the application is launched, you could store the num-
ber of times the application has been launched in the NSUserDefaults .
Search WWH ::




Custom Search