Hi All,
I have a bit of code that does what I want and takes a screen shot. Apple have now said that screen shots have to be taken not using UIGetScreenImage(), but UIGraphicsBeginImageContextWithOptions. Could anyone point me in the right direction. Here's a snippet of code that shows how I am doing it at the moment.
CGImageRef inImage = UIGetScreenImage();
UIScreen* mainscr = [UIScreen mainScreen];
CGSize screenSize = mainscr.currentMode.size;
CGImageRef handRef;
if(screenSize.height > 500)
{
handRef = CGImageCreateWithImageInRect(inImage, CGRectMake(320,460,1,1));
}
else
{
handRef = CGImageCreateWithImageInRect(inImage, CGRectMake(160,230,1,1));
}
unsigned char rawData[4];
CGContextRef context = CGBitmapContextCreate(
rawData,
CGImageGetWidth(handRef),
CGImageGetHeight(handRef),
CGImageGetBitsPerComponent(handRef),
CGImageGetBytesPerRow(handRef),
CGImageGetColorSpace(handRef),
kCGImageAlphaPremultipliedLast
);
Anyone how I can do this now?
Thanks to any answers in advance!