Ios iphone-为动画图像着色/着色/发光
我目前正在使用Ios iphone-为动画图像着色/着色/发光,ios,iphone,objective-c,animation,uiimage,Ios,Iphone,Objective C,Animation,Uiimage,我目前正在使用[UIImage animatedImageNamed:@“…”duration:1.0f]在我的iOS 7应用程序中为一系列PNG图像设置动画 当图像静止时,我使用UIGraphicsGetImageFromCurrentImageContext()如下所示: UIGraphicsBeginImageContextWithOptions(self.bounds.size, NO, [UIScreen mainScreen].scale); { [self
[UIImage animatedImageNamed:@“…”duration:1.0f]
在我的iOS 7应用程序中为一系列PNG图像设置动画
当图像静止时,我使用UIGraphicsGetImageFromCurrentImageContext()
如下所示:
UIGraphicsBeginImageContextWithOptions(self.bounds.size, NO, [UIScreen mainScreen].scale);
{
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIBezierPath* path = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
[color setFill];
[path fillWithBlendMode:kCGBlendModeSourceAtop alpha:1.0];
image = UIGraphicsGetImageFromCurrentImageContext();
} UIGraphicsEndImageContext();
…然后单击动画以使图像遮罩发光/着色/着色。但是,对于动画图像,是否有办法设置遮罩动画,使其跟随动画PNG?(我所说的“遮罩”是指我正在制作动画的图像内容的形状或轮廓。)