How to make the UNDO action in image processing? If I am change the image position(Resize, Rotation, 3D Transform) then click UNDO button, I want the previous state of the image. How to do? Please give sample source code or give some idea about this. Thanks in advance.
Share
Make a
NSDictionarywith alleffectsproviding / or can be applid with youreditorNSDictionaryinto anNSMutableArraywith[lastEffectArray addObject:effectDictionary];effectDictionaryeffects fromlastEffectArraywithkey/valuepair. Here, you can do two things :Can
RemovelasteffectDictionaryobject fromlastEffectArrayor,Addit for REDO action into other array.Your
effectDictionaryshould store each & every effects which can be available or applied with youreditor. You can make some easy-to-use function to apply / remove effects!!!Lastly, don’t forget to
[release]all effects Array & dictionaries.Note, This isn’t a solution, but can be implemented with own innovative logic.