tags:

views:

24

answers:

1

I have implemented game application in which i have select some portion of image.Now i want to animate selected portion of image on shake effect?Is it possible?if possible then how to implement give me some idea about that?

A: 

Try placing an image view overtop of that portion, capturing the image under it, and animating that? A starting point:

    CGRect contextRect  = CGRectMake(50, 50, 200, 200);// whatever you need
    UIGraphicsBeginImageContext(contextRect.size); 

    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

from http://www.iphonedevsdk.com/forum/iphone-sdk-development/2353-possible-make-screenshot-programmatically-2.html

Kenny Winker