0
如何截取UIView中選定框架的屏幕截圖並將其設置爲UIImage?在UIView中截取選定框架的屏幕截圖
我也試過這個
UIGraphicsBeginImageContext(CGSizeMake(width,height));
CGContextRef context = UIGraphicsGetCurrentContext();
[imageview.layer renderInContext:context];
UIImage *screenShot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
更改您的上下文是你想要捕捉的UIView的背景下。 – FaddishWorm
檢查http://stackoverflow.com/questions/8702834/programmatically-take-a-screenshot-of-specific-area – iPatel