mirror of
https://github.com/zhigang1992/GVUserDefaults.git
synced 2026-01-12 09:04:17 +08:00
Use nonatomic, weak attributes to prevent warning when the category is included in your prefix header.
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
#import "GVUserDefaults.h"
|
||||
|
||||
@interface GVUserDefaults (NoPrefix)
|
||||
@property NSString *userName;
|
||||
@property NSNumber *userId;
|
||||
@property (nonatomic, weak) NSString *userName;
|
||||
@property (nonatomic, weak) NSNumber *userId;
|
||||
@end
|
||||
|
||||
@implementation GVUserDefaults (NoPrefix)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
@interface GVUserDefaults (Properties)
|
||||
|
||||
@property NSString *userName;
|
||||
@property NSNumber *userId;
|
||||
@property (nonatomic, weak) NSString *userName;
|
||||
@property (nonatomic, weak) NSNumber *userId;
|
||||
|
||||
@end
|
||||
|
||||
@@ -7,8 +7,8 @@ Create a category on `GVUserDefaults`, add some properties in the .h file and ma
|
||||
|
||||
// .h
|
||||
@interface GVUserDefaults (Properties)
|
||||
@property NSString *userName;
|
||||
@property NSNumber *userId;
|
||||
@property (nonatomic, weak) NSString *userName;
|
||||
@property (nonatomic, weak) NSNumber *userId;
|
||||
@end
|
||||
|
||||
// .m
|
||||
|
||||
Reference in New Issue
Block a user