Initialising an object as its subclass in objective-c++ / iphone sdk
i have a class, in which i am initialising another class that i have made. the other class that i have made has a subclass with only a few changes (none to the init method). What i am wondering is will it be ok if i try to do this. the code looks something like this.
in one of the cases: self.shapeLayer = [[UMShapeLayer alloc] init]; in a different case: self.shapeLayer = [[UMShapeLayerOnslaught alloc] init开发者_运维知识库];
if this will cause problems and there another way that i can do this, please could somebody tell me.
No longer need to know. I got round to testing the library that i was using, and it does work
精彩评论