給定一個CGMutablePathRef如何在其中繪製UIImage?我知道,你可以繪製如下所示:在CGMutablePath中繪製UIImage
UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[scaledImage drawAtPoint:CGPointMake(0, 0)];
CGContextRestoreGState(context);
,但我不知道如果我有一個路徑(這與圓角矩形)我怎麼在裏面加一個形象呢?
蘋果醫生說:「你應該叫時才基於位圖的圖形上下文是當前圖形上下文這個功能,在當前上下文是零或不是由創建。一個調用UIGraphicsBeginImageContext,這個函數返回nil。「 ,你的情況是? –