File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -206,10 +206,12 @@ class PinchZoomView: UIView {
206206 offset = CGSize ( width: location. x - startLocation. x, height: location. y - startLocation. y)
207207
208208 case . ended, . cancelled, . failed:
209- isPinching = false
210- scale = 1.0
211- anchor = . center
212- offset = . zero
209+ withAnimation ( . interactiveSpring( ) ) {
210+ isPinching = false
211+ scale = 1.0
212+ anchor = . center
213+ offset = . zero
214+ }
213215 default :
214216 break
215217 }
Original file line number Diff line number Diff line change @@ -229,10 +229,12 @@ class PinchZoomView: UIView {
229229 offset = CGSize ( width: location. x - startLocation. x, height: location. y - startLocation. y)
230230
231231 case . ended, . cancelled, . failed:
232- isPinching = false
233- scale = 1.0
234- anchor = . center
235- offset = . zero
232+ withAnimation ( . interactiveSpring( ) ) {
233+ isPinching = false
234+ scale = 1.0
235+ anchor = . center
236+ offset = . zero
237+ }
236238 default :
237239 break
238240 }
You can’t perform that action at this time.
0 commit comments