File tree 2 files changed +12
-8
lines changed
2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -206,10 +206,12 @@ class PinchZoomView: UIView {
206
206
offset = CGSize ( width: location. x - startLocation. x, height: location. y - startLocation. y)
207
207
208
208
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
+ }
213
215
default :
214
216
break
215
217
}
Original file line number Diff line number Diff line change @@ -229,10 +229,12 @@ class PinchZoomView: UIView {
229
229
offset = CGSize ( width: location. x - startLocation. x, height: location. y - startLocation. y)
230
230
231
231
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
+ }
236
238
default :
237
239
break
238
240
}
You can’t perform that action at this time.
0 commit comments