File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,13 @@ class ViewManager : NSObject {
173
173
removeBehavior ( snapBehavior)
174
174
}
175
175
176
+ func resnapView( ) {
177
+ if case . snapping( _) = state {
178
+ unsnapView ( )
179
+ state = snappingStateAtContainerCenter ( )
180
+ }
181
+ }
182
+
176
183
fileprivate func attachView( toPoint point: CGPoint ) {
177
184
anchorView. center = point
178
185
anchorView. backgroundColor = UIColor . blue
Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ open class ZLSwipeableView: UIView {
117
117
override open func layoutSubviews( ) {
118
118
super. layoutSubviews ( )
119
119
containerView. frame = bounds
120
+ for viewManager in viewManagers. values {
121
+ viewManager. resnapView ( )
122
+ }
120
123
}
121
124
122
125
// MARK: Public APIs
You can’t perform that action at this time.
0 commit comments