Support an "Undo" Action
Closed this issue · 5 comments
This means, for example, when swiping a view away through the right side, the view should be returned from the right.
As for the implementation, I think the best would be if the ZLSwipeableView instance will always save a reference to the last instance which was swiped away, with the direction it was swiped away to. In addition, it will expose an undo
method.
Hi, I worked on the swift version of ZLSwipeableView over the weekend. It comes with an undo example. Check it out: https://github.com/zhxnlai/ZLSwipeableViewSwift
WTG @zhxnlai and thanks a lot! Looks great!!
I will try it!
Thanks!
Hi @zhxnlai
It took some time, but I'm now trying to test the new Undo support that you added.
The thing is that I'm not that femiliar with Swift (yet), and I'm having some difficulties doing the replacement of ZLSwipeableView with its Swift version.
How hard do you think it will be to add the Undo support to this Obj-C project? I tried to look, but it doesn't seem trivial to me...
I'd also love to see this in the obj-c version. It doesn't appear to be possible since there's no "insertTopView" method on the obj-c version which allows snapping back an added view (view to undo).