0
我正在使用此鏈接(http://www.raywenderlich.com/18840/how-to-make-a-simple-drawing-app-with-uikit)來製作繪畫應用程序,我也想執行撤消操作。撤消在繪畫應用程序中的操作
我用這段代碼保存用戶在可變數組[[completeLines]中所做的每個草圖)。這些更改在touchesEnded方法中完成。
UIGraphicsBeginImageContextWithOptions(_tempDrawImage.bounds.size, NO,0.0);
[_tempDrawImage.image drawInRect:CGRectMake(0, 0, _tempDrawImage.frame.size.width, _tempDrawImage.frame.size.height)];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
[completeLines addObject:image];
現在我無法從主圖像中刪除存儲在可變數組中的這些圖像。