Re: Question about categories
Re: Question about categories
- Subject: Re: Question about categories
- From: Shaun Wexler <email@hidden>
- Date: Sat, 2 Sep 2006 21:07:00 -0700
On Sep 2, 2006, at 2:12 PM, Alan Smith wrote:
I'm making a category on a class and want to add onto the classes
designated initializer method.
I tried overriding it but then I can't use something like this:
if (self = [self init...)
Because that would create an endless loop.
Posing your subclass as the class you're overriding is one option,
and it will work, but may not be completely future-proof. How about
swizzling the method IMP? You don't even need a subclass/class to
declare a replacement method.
More info upon request... ;)
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden