How do I use objc_getAssociatedObject/objc_getAssociatedObject inside an object?

Posted by leo on Stack Overflow See other posts from Stack Overflow or by leo
Published on 2010-05-17T01:24:02Z Indexed on 2010/05/17 1:30 UTC
Read the original article Hit count: 254

Filed under:
|

If I use objc_setAssociatedObject/objc_getAssociatedObject inside a category implementation to store a simulated instance variable in a setter method, how would I access the key in the getter method since any variables declared in the setter method would be outside the scope of the getter method?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about categories