How to map an property of ClassA to one of SuperclassA?

Posted by mystify on Stack Overflow See other posts from Stack Overflow or by mystify
Published on 2010-03-15T16:28:57Z Indexed on 2010/03/15 16:29 UTC
Read the original article Hit count: 150

Filed under:
|

I have a class named SuperclassA, and an class named ClassA. ClassA inherits from SuperclassA.

SuperclassA has got an property called something, so a very generic not-much-saying name. In ClassA, I want to have an property which maps to that something of SuperclassA.

How could I do that? I want to make absolutely sure that any access to myBetterProperty results in accessing what's behind something.

Assigning an value to myBetterProperty should result in assigning one to something, and vice versa.

How to? Pointers set up in init? How would that look like?

*self.myBetterProperty = &something; ? I'm not sure about that...

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about pointers