Hi,
I am new to iPad development. I want to use CATiledLayer to load an image. I have derived a class from UIView and in the init method of this class, I am writing,
CATiledLayer *tiledLayer = (CATiledLayer *)[self layer];
But when I write
tiledLayer.levelsOfDetail = 4;
it gives me error that "[CALayer setLevelsOfDetail:]: unrecognized selector sent to instance 0xcd04450" . So it is not doing the type-cast of CALayer class to CATiledLayer. I wanted to check the class type of tiledLayer, so I wrote the following statements after type-casting:
NSString *pqr = [[NSString alloc]initWithFormat:@"%@", [tiledLayer class]];
NSLog(pqr);
But it prints CALayer instead of CATiledLayer. Why is it doing so?? Can anyone help me what am I missing?? I am stuck here.