2013-10-25 4 views
-2

이미지보기에서 손가락을 움직여 이미지를 지울 필요가있는 응용 프로그램이 있습니다. blendmodeClear 옵션을 사용하여이 작업을 수행 할 수 있습니다. 이제 다른 옵션을 위해 이미지보기의 삭제 된 부분을 채워야합니다. 누구든지 나를 어떻게 안내 할 수 있습니다.ios에서 uiimageview를 통해 이미지를 그리는 방법

감사합니다.

+1

blendmodeClear 옵션으로 취소 했습니까? –

+0

네,하지만 그건 우리가 승인 된 부분을 인계하는 방식이어야합니다. 손가락으로 색칠하기. – pankaj

+0

실제로 그 부분을 지우면 흰색 부분이 희게됩니다. 그래서 나는 그 부분을 다시 채울 필요가있다. 감사 – pankaj

답변

0
You can maintain stack using NSMutableArray, and keep the images in them after each edit steps. Pop the image last entered if user press an undo option. 

for eg: 
[image1] --- > red colored 

user edits it and adds green color 

[image2] --- > green color mixed image 
[image1] --- > red colored 

user moves finger and clears a part 

[image3] --- > image with part partly cleared 
[image2] --- > green color mixed image 
[image1] --- > red colored 


now when user press undo, u can just pop the last entered image (in step 2) 
ie. image 2 . (so we get the stage just before the user cleaerd the part of the image 
. 

does this help? or ur requirement is different? 
관련 문제