This is what I used:
UIBezierPath *_path;
shapeLayer.path = _path.CGPath;
shapeLayer.lineWidth =10;
shapeLayer.lineCap=kCALineCapRound;
UIColor *color=[dict objectForKey:@"Colors"];
shapeLayer.strokeColor = color.CGColor;
shapeLayer.fillColor = [UIColor clearColor].CGColor;
[self.layer addSublayer:shapeLayer];
I am not able to delete the layer from in-between.