I am taking screenshot image from currentview.but i want to set frame….don't want to convert fullview as image.I gave frame size..but it takes always Image as fullview..any help please?
CGRect rectt = CGRectMake(100, 150,150,200);
UIGraphicsBeginImageContext(rectt.size);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageView *imgView = [[UIImageView alloc] initWithFrame:rectt];
try to use this subClass:
with this files code
for CaptureView.h:
for CaptureView.m:
quartz might help you... look at creating image from part of image.... its not a direct solution to your question, but i think you'll be able to tweak it to fit your needs..