我有这门课:
@interface PersonModel : NSObject
@property (nonatomic, weak) NSString *string;
@property (nonatomic, weak) NSMutableArray *array;
@end
在另一个类中,我使用该字符串和数组。字符串正常,但数组为空。我像往常一样启动它,如下所示:
person.array = [[NSMutableArray alloc] init];
[person.array addObject:[object copy]];
NSLog(@"Array: %@", person.array);