问题
how can i use drawLayer for multiple layers in one class? I was thinking maybe something like this:
- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)context {
if(layer == layer1) {
//do this
}
if(layer == layer2) {
//do something else
}
}
how would i do that?
来源:https://stackoverflow.com/questions/4579795/multiple-drawlayer