我有一个包含 3 个子视图的父 UIView,这里我有一个 UIButton 来捕捉整个视图。我已经这样做了
UIGraphicsBeginImageContext(CGSizeMake(320,480));
CGContextRef context = UIGraphicsGetCurrentContext();
UIImage *screenShot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[self.view.layer renderInContext:context];
在这里,我只需要捕获名称为 subview1 的第一个子视图。我怎样才能做到这一点?