Re: Implementing NSFastEnumeration
Kyle Sluder <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Oct 1, 2009 at 9:43 AM, Gerd Knops <[email protected]> wrote: > AFAIK subclassing class clusters doesn't work, which is why I think they are > a poor design. It is certainly possible to subclass a class cluster. Sometimes it's not easy. A common strategy is to implement the subclass with an ivar of the superclass type, like so: @interface MyAttributedString : NSAttributedString { @private NSAttributedString *originalString; } @end And then implement the documented primitive methods in terms of this ivar. --Kyle Sluder