remove touchdown animation

This commit is contained in:
Levitating Pineapple
2024-09-30 16:04:14 +03:00
parent bbe614aef7
commit 2a8df6ace1
2 changed files with 2 additions and 6 deletions

View File

@@ -234,14 +234,11 @@ struct ListRow: ViewModifier {
} catch { }
}
case .ended:
task?.cancel()
if hitTest(gesture.location(in: self), with: nil) == self {
representer?.touchDown = true
withAnimation(.easeIn(duration: 0.05)) { representer?.touchDown = false }
representer?.action()
} else {
representer?.touchDown = false
}
task?.cancel()
representer?.touchDown = false
case .changed:
if let startLocation {
let location = gesture.location(in: nil)

View File

@@ -40,7 +40,6 @@ struct SheetRepresentable<Content: View>: UIViewControllerRepresentable {
func updateUIViewController(_ sheetController: Controller<Content>, context: Context) {
sheetController.animate(isPresented: isPresented)
sheetController.hostingController.rootView = content
}
class Controller<C: View>: UIViewController {