Created
March 15, 2013 19:38
-
-
Save yfrancis/5172526 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define ASSOCIATED_PROPERTY(Type, getter, setter, key, association) \ | |
static char key;\ | |
%new -(void)setter:(Type)val{objc_setAssociatedObject(self, &key, val, association);}\ | |
%new -(Type)getter{return objc_getAssociatedObject(self, &key);} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment