1
Je dois créer un jeu pour l'iPhone 3 dans lequel l'image pixel par pixel disparaîtra. J'utiliseQuelles méthodes puis-je utiliser pour effacer l'image pixel par pixel?
UIGraphicsBeginImageContext (CGSizeMake (300.0f, 440.0f));
[MyImage.image drawInRect: CGRectMake (0, 0, 320, 480)];
while (i <4380) {
if (condition) {
CGContextClearRect (UIGraphicsGetCurrentContext(), CGRectMake (x, y, width, height));
}
}
MyImage.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
mais ce code fonctionne lentement sur l'iPhone MB046LL
Quelles méthodes puis-je utiliser pour effacer le pixel d'image par pixel?
formatez votre question ... vous pouvez spécifier le code en utilisant les accolades ..... – lukya