.gesture(DragGesture(minimumDistance: 0, coordinateSpace: .local)
.onEnded({ value in
if value.translation.width < 0 {
// left
}
if value.translation.width > 0 {
// right
}
if value.translation.height < 0 {
// up
}
if value.translation.height > 0 {
// down
}
}))
기능 설명
뷰 이동시, 기존에 좌우 방향이 아닌, 아래에서 위 방향으로 제스처를 추가하자.
Todo
요구사항
참고링크