是否可以将背景图像添加到CAShape? (iPhone)

我试图以任意方式扭曲图像,例如遵循贝塞尔曲线形状。我已经使用CAShapeLayer来创建形状,但似乎将其内容设置为图像不起作用。如何在形状后扭曲图像?它甚至可能吗? 谢谢!     
已邀请:
目前这是不可能的。如果您认为应该支持,我建议提交雷达(http://bugreport.apple.com)。 另请参见:可以将CGImage添加到CAShapeLayer的contents属性中吗?     
这是不可能的,但我成功地将CALayer放在CAShapeLayer的顶部。 这是我的代码:
CALayer *image =[CALayer layer];
image.frame = CGRectMake(0, 0, 75, 75);
image.contents = (id) [UIImage imageNamed:@"number-1"].CGImage;    
 [self.layer addSublayer:image];



UIBezierPath *circle = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0, 0, 75, 75)];
blueCircleLayer = [CAShapeLayer layer];
blueCircleLayer.path = circle.CGPath;
blueCircleLayer.strokeColor = [UIColor blueColor].CGColor;
blueCircleLayer.fillColor = [UIColor clearColor].CGColor;
blueCircleLayer.shadowColor =[UIColor blackColor].CGColor;
blueCircleLayer.shadowOffset = CGSizeMake(0.0f, 5.0f);
blueCircleLayer.shadowOpacity = 0.7f;
blueCircleLayer.lineWidth = 7.0;

[self.layer addSublayer:blueCircleLayer];
    

要回复问题请先登录注册