-1
我有一個UIImage的,我想深複製到另一個(這樣我可以把它添加到圖像的一個NSMutableArray)深複製的UIImage與ARC
我不能去深拷貝,我已經看過區等等,但這不是運氣。
這是我曾嘗試:
_incrementalImage = UIGraphicsGetImageFromCurrentImageContext();
UIImage *imgcpy = [[UIImage allocWithZone:[_incrementalImage zone]];
[stack addObject:imgcpy];
基本上我需要incrementalImage的拷貝到堆棧不會,如果_incrementalImage或currentImageContext的變化而變化。
這個問題的答案是否有幫助? (我認爲'CGImageRelease()'丟失,但無論如何):http://stackoverflow.com/questions/3867980/how-do-i-make-an-exact-copy-of-a-uiimage-returned- from-a-uiimagepickercontroller – trojanfoe
[使UIImage的深層副本]可能重複(http://stackoverflow.com/questions/4002040/making-deep-copy-of-uiimage) –