Simple-Paint-App-iOS icon indicating copy to clipboard operation
Simple-Paint-App-iOS copied to clipboard

How to add a undo button into your project!

Open ToanNguyens opened this issue 11 years ago • 3 comments

....I using your project to make a paint app but I don't know how to make a button for user can undo when they want. Can u show me?

Thanks!

ToanNguyens avatar Dec 26 '13 08:12 ToanNguyens

@ToanNguyens Do you still need help with this?

JagCesar avatar Mar 13 '14 17:03 JagCesar

Yab, Plz! Thanks so much!

ToanNguyens avatar Mar 14 '14 09:03 ToanNguyens

I totally forgot about this, sorry @ToanNguyens! Adding an undo button shouldn't be a big problem. I haven't looked on this code in a very long time, but I think I would try to save the deltas between different states. Then just apply or remove the deltas depending if the user wants to step forward or backward. I hope it at least points you in the right direction :)

JagCesar avatar May 02 '14 18:05 JagCesar