Instance Method

setBool:forKey:

Sets the value of the specified default key to the specified Boolean value.

Declaration

- (void)setBool:(BOOL)value forKey:(NSString *)defaultName;

Parameters

value

The Boolean value to store in the defaults database.

defaultName

The key with which to associate the value.

Discussion

This is a convenience method for calling setObject:forKey:.

See Also

Setting Default Values

- setObject:forKey:

Sets the value of the specified default key.

- setFloat:forKey:

Sets the value of the specified default key to the specified float value.

- setDouble:forKey:

Sets the value of the specified default key to the double value.

- setInteger:forKey:

Sets the value of the specified default key to the specified integer value.

- setURL:forKey:

Sets the value of the specified default key to the specified URL.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software