IOS-View截图

UIGraphicsBeginImageContextWithOptions(inputView.bounds.size, NO, 0);

[inputView.layer renderInContext:UIGraphicsGetCurrentContext()];

UIImage *image = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

你可能感兴趣的:(IOS-View截图)