I am trying to create "fake" instance variables in categories using objc_setAssociatedObjectas described in this post .
However, I get the following error using ARC in iOS 6.1: Use of undeclared identifier 'OBJC_ASSOCIATION_RETAINfor the following code snippet:
- (void)setStyleName:(NSString *)styleName
{
objc_setAssociatedObject(self, kDHStyleKey, styleName,
OBJC_ASSOCIATION_RETAIN);
}
What has changed for iOS 6.1?
What did I miss?
Alexr source
share