Remove unused gesture

This commit is contained in:
Arkadiusz Fal
2022-08-13 16:14:07 +02:00
parent f828943982
commit e8dbf46e14
2 changed files with 0 additions and 36 deletions

View File

@@ -1,22 +0,0 @@
import SwiftUI
extension View {
func onSwipeGesture(
up: @escaping () -> Void = {},
down: @escaping () -> Void = {}
) -> some View {
gesture(
DragGesture(minimumDistance: 10)
.onEnded { gesture in
let translation = gesture.translation
if abs(translation.height) > 100_000 {
return
}
let isUp = translation.height < 0
isUp ? up() : down()
}
)
}
}