Created
September 21, 2012 07:26
-
-
Save tonycn/3760192 to your computer and use it in GitHub Desktop.
objc runtime used to create dynamic attribute
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
- (NSString *)viewFrame1 { | |
return objc_getAssociatedObject(self, kUIViewAdditionsFrame1); | |
} | |
- (void)setViewFrame1:(NSString *)frameStr { | |
objc_setAssociatedObject(self, kUIViewAdditionsFrame1, frameStr, OBJC_ASSOCIATION_RETAIN_NONATOMIC); | |
} | |
- (NSString *)viewFrame2 { | |
return objc_getAssociatedObject(self, kUIViewAdditionsFrame2); | |
} | |
- (void)setViewFrame2:(NSString *)frameStr { | |
objc_setAssociatedObject(self, kUIViewAdditionsFrame2, frameStr, OBJC_ASSOCIATION_RETAIN_NONATOMIC); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment