ios CALayerデリゲートdisplayLayerが呼び出されていません
出典: http://mysterycoconut.com/blog/2011/01/cag1/
- (id)initWithCoder:(NSCoder *)aDecoder;
{
if (self = [super initWithCoder:aDecoder])
{
MyLayer* _myLayer = [MyLayer layerWithImage:img sampleSize:fSize];
_myLayer.delegate = self;
CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"imageIndex"];
anim.fromValue = [NSNumber numberWithInt:1];
anim.toValue = [NSNumber numberWithInt:5];
anim.duration = 2f;
anim.repeatCount = 1;
[richter addAnimation:anim forKey:nil];
[self.view.layer addSublayer:_myLayer];
}
return self;
}
// CALayer delegate needs this method for variable sample size to work
- (void)displayLayer:(CALayer *)layer{
}
displayLayer は呼び出されませんか?
ありがとうございます。それでは、お元気で