Skip to content

Instantly share code, notes, and snippets.

@adamyanalunas
Created March 25, 2014 23:25
Show Gist options
  • Save adamyanalunas/9773674 to your computer and use it in GitHub Desktop.
Save adamyanalunas/9773674 to your computer and use it in GitHub Desktop.
Can I use objc_getAssociatedObject to read 3rd party ivars hidden behind @implementation?
@interface THObserver (RevealYourSecrets)
@property (nonatomic, strong) id block;
@end
@implementation THObserver (RevealYourSecrets)
@dynamic block;
- (id)block
{
return objc_getAssociatedObject(self, @selector(block));
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment