Populating a dictionary with predefined values
[permalink]
dictionaryWithObjectsAndKeys is handy if you're setting up a defaults preference dictionary (or text attributes, or any dictionary) by hand:
defaults = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithFloat: 25.0], @"density",
[NSNumber numberWithFloat: 40.0], @"rate",
nil];