how to do undo on touch event...
I draw a line using touchesBegan,touchesMoved and touchesEnded.....
Now I want to do undo operation to get my previous state on iphone....
any one can help me how do undo operations on iphone?
thanks in advance....
how to do undo on touch event...
I draw a line using touchesBegan,touchesMoved and touchesEnded.....
Now I want to do undo operation to get my previous state on iphone....
any one can help me how do undo operations on iphone?
thanks in advance....
You will have to do this manually when the undo message is sent. You need to keep a history of what's been drawn, most likely in a stack.
Then, just pop with the undo call and restore the view.
The stack should probably just hold the layers, so you can remove them from super on pop.