CAShapeLayer filling with another CAShapeLayer as a mask
My question is about filling animation one CAShapeLayer with another CAShapeLayer . So, I wrote some code that almost achieves my goal. I created a based layer and fill it with another. Code below: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. _shapeLayer = [CAShapeLayer layer]; [self drawBackgroundLayer]; } // my main/backgound layer - (void)drawBackgroundLayer { _shapeLayer.frame = CGRectMake(0, 0, 250, 250); _shapeLayer.lineWidth = 3; _shapeLayer.strokeColor = [UIColor blackColor].CGColor; _shapeLayer.fillColor = UIColor