Use nonatomic, weak attributes to prevent warning when the category is included in your prefix header.

This commit is contained in:
Kevin Renskers
2012-12-19 15:14:39 +00:00
parent 4d982ab97a
commit 9e96a5a83b
3 changed files with 6 additions and 6 deletions

View File

@@ -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)

View File

@@ -10,7 +10,7 @@
@interface GVUserDefaults (Properties)
@property NSString *userName;
@property NSNumber *userId;
@property (nonatomic, weak) NSString *userName;
@property (nonatomic, weak) NSNumber *userId;
@end

View File

@@ -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