Propriedades do Mixin em classes ObjC por meio do tempo de execução ObjC
// header@interface NSObject (PornName)@property (nonatomic, strong) NSString *pornName;@end// implementation#import <objc/runtime.h>static char const * const PornNameKey = “PornNameKey”;@implementation NSObject (PornName)@dynamic pornName;- (NSString *)pornName { return objc_getAssociatedObject(self, PornNameKey);}- (void)setPornName:(NSString *)pornName { objc_setAssociatedObject(self, …
Continuar lendo