开发者

Initialising an object as its subclass in objective-c++ / iphone sdk

开发者 https://www.devze.com 2023-01-13 12:22 出处:网络
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 wil

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

0

精彩评论

暂无评论...
验证码 换一张
取 消