//在每次改變其值之後都執行它的synchronize方法即可
[[NSUserDefaults standardUserDefaults] synchronize];
value parameter can be only property list objects: NSData, NSString, NSNumber, NSDate, NSArray, or NSDictionary. For NSArray and NSDictionary objects, their contents must be property list objects. See What is a Property List? in Property List Programming Guide.