#iOS笔记#Category
2020-03-15 本文已影响0人
MAXcrazs
-(void)setName:(NSString *)name {
objc_setAssociatedObject(self, @"name",name,OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
-(NSString *)name {
return objc_getAssociatedObject(self, @"name");
}
-(void)setName:(NSString *)name {
objc_setAssociatedObject(self, @"name",name,OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
-(NSString *)name {
return objc_getAssociatedObject(self, @"name");
}