如何在Apple Watch上为程序生成的图像设置动画?

时间:2015-08-21 10:22:46

标签: ios objective-c animation watchkit apple-watch

我正在以这种方式生成图像:

UIGraphicsBeginImageContextWithOptions(drawingRect.size, YES, [UIScreen mainScreen].nativeScale);

CGContextRef contextRef = UIGraphicsGetCurrentContext();

for(NSInteger i = 0; i < 100; i++)
{
    //draw image

    UIImage *returningImage = UIGraphicsGetImageFromCurrentImageContext();
    NSData *data = UIImagePNGRepresentation(returningImage);


    [data writeToFile:[Helper getPathOfFileWithName:[NSString stringWithFormat:@"frame%ld.png", i]] atomically:YES];

}

UIGraphicsEndImageContext();

问题是,我如何保存并使用?

0 个答案:

没有答案