我正在从xib创建一个UIView,以便最终呈现为一个UIImage。UIGraphicsBeginImageContextWithOptions(view.bounds.size, NO, 0.0);
[view.layer renderInContext:UIGraphicsGetCurrentContextU
下面是我正在尝试的代码,尽管添加了视图,但它没有绘制任何内容。//loc1 and loc2 are the touch locations on the view used to draw a rectCGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGContextSetRGBStrokeColor(UIGraphicsGetCurren