如何提高IOS中的性能绘图图像?

时间:2013-09-27 12:02:22

标签: ios objective-c uiimage

我正在制作一个应用程序,我必须在每个周期绘制一定数量的图像。 此数字可能因某些用户操作而异。 当数字开始增长到应用程序变得非常慢时,速度性能对它来说是最重要的。

此时我很好地吸引了这些人:

//打开上下文

IGraphicsBeginImageContext(gameImage.frame.size);

//绘制所有图像 // imagemref是UIImage的NSArray

CGContextDrawImage(UIGraphicsGetCurrentContext(), CGRectMake(x,y, sizeX, sizeY),[[imagemref objectAtIndex:i] CGImage]);

//结束语境

gameImage.image = UIGraphicsGetImageFromCurrentImageContext();
[gameImage setAlpha:opacidade];
UIGraphicsEndImageContext();

如果有人有更有效的绘画方式。我很喜欢学习

0 个答案:

没有答案