Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DZLCategoryProperties/NSObject+DZLCategoryProperties.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ + (void)implementGetterIfNecessaryForPropertyName:(char const *)propertyName cus
{
SEL getter = NSSelectorFromString(customGetterName ?: [NSString stringWithFormat:@"%s", propertyName]);
[self implementMethodIfNecessaryForSelector:getter parameterTypes:NULL block:^id(id _self) {
return objc_getAssociatedObject(self, key);
return objc_getAssociatedObject(_self, key);
}];
}

Expand All @@ -137,7 +137,7 @@ + (void)implementSetterIfNecessaryForPropertyName:(char const *)propertyName cus

SEL setter = NSSelectorFromString(customSetterName ?: [NSString stringWithFormat:@"set%c%s:", toupper(*propertyName), propertyName + 1]);
[self implementMethodIfNecessaryForSelector:setter parameterTypes:"@" block:^(id _self, id var) {
objc_setAssociatedObject(self, key, var, associationPolicy);
objc_setAssociatedObject(_self, key, var, associationPolicy);
}];
}

Expand Down