Associative References : Not so popular Objective-C 2.0 feature

One of the good things in Objective-C is the Category. Why is it good? Needless to say, it is good because you can add some methods to a class of which source codes you don’t have.

However sometimes you may wonder if there is a way to add a member variable to an existing class on the fly. Strictly speaking, it is not possible. However, you can simulate it by using associative references.

Detailed information is here.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: