Casting to a superclass
Casting to a superclass
- Subject: Casting to a superclass
- From: Rob Rix <email@hidden>
- Date: Mon, 16 Jul 2001 10:50:46 -0400
Hello, all.
I'm writing a utility class, which will have an NSMutableSet as an ivar. I
want users of the class to be able to access the set, but as an immutable
object.
So, can I typecast the NSMutableSet to NSSet, or should I just return
[NSSet setWithSet:someSet];?
Thanks,
-- Rob
Flying is not difficult. Surviving the (crash) landing is difficult.