Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios iphone-为动画图像着色/着色/发光_Ios_Iphone_Objective C_Animation_Uiimage - Fatal编程技术网

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?(我所说的“遮罩”是指我正在制作动画的图像内容的形状或轮廓。)