NSUserDefaults(FWFoundation)
@interface NSUserDefaults (FWFoundation)
/// 读取对象,支持unarchive对象
- (nullable id)fw_objectForKey:(NSString *)key NS_REFINED_FOR_SWIFT;
/// 保存对象,支持archive对象
- (void)fw_setObject:(nullable id)object forKey:(NSString *)key NS_REFINED_FOR_SWIFT;
/// 从standard读取对象,支持unarchive对象
+ (nullable id)fw_objectForKey:(NSString *)key NS_REFINED_FOR_SWIFT;
/// 保存对象到standard,支持archive对象
+ (void)fw_setObject:(nullable id)object forKey:(NSString *)key NS_REFINED_FOR_SWIFT;
@end
Undocumented
-
读取对象,支持unarchive对象
Declaration
Objective-C
- (nullable id)fw_objectForKey:(nonnull NSString *)key;
-
保存对象,支持archive对象
Declaration
Objective-C
- (void)fw_setObject:(nullable id)object forKey:(nonnull NSString *)key;
-
从standard读取对象,支持unarchive对象
Declaration
Objective-C
+ (nullable id)fw_objectForKey:(nonnull NSString *)key;
-
保存对象到standard,支持archive对象
Declaration
Objective-C
+ (void)fw_setObject:(nullable id)object forKey:(nonnull NSString *)key;