Skip to content

Commit 43b834f

Browse files
authored
Merge pull request #64 from jboulter11/master
Fix rewind's edge cases and incorrect removal.
2 parents 5380d93 + 9465d8f commit 43b834f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ZLSwipeableViewSwift/ZLSwipeableView.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ public class ZLSwipeableView: UIView {
147147

148148
guard let view = viewToBeRewinded else { return }
149149

150-
remove(activeViews().last!)
150+
if UInt(activeViews().count) == numberOfActiveView && activeViews().first != nil {
151+
remove(activeViews().last!)
152+
}
151153
insert(view, atIndex: allViews().count)
152154
updateViews()
153155
}

0 commit comments

Comments
 (0)