Next Page > Hide TOC

ScreenSaverDefaults Class Reference

Inherits from
Conforms to
Framework
Library/Frameworks/ScreenSaver.framework
Availability
Available in Mac OS X v10.0 and later.
Declared in
ScreenSaverDefaults.h
Related sample code

Overview

ScreenSaverDefaults defines a set of methods for saving and restoring user defaults for screen savers.

Because screen savers are packaged as bundles and loaded by several different applications, it is not possible to use NSUserDefaults to store user preferences for them. ScreenSaverDefaults adds the method defaultsForModuleWithName: to get an instance corresponding to a particular module name. Screen savers should typically use their bundle identifier as the module name. Once you have an instance of screen saver defaults, you can use the normal methods of NSUserDefaults to load, store, or modify values.

Tasks

Obtaining the ScreenSaverDefaults Instance

Class Methods

defaultsForModuleWithName:

Returns a screen saver defaults instance that reads and writes defaults for the module moduleName.

+ (id)defaultsForModuleWithName:(NSString *)moduleName

Availability
Related Sample Code
Declared In
ScreenSaverDefaults.h

Next Page > Hide TOC


© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.