I would like to get get the location of first touch when users starts panning from the bottom of the screen and only then read position and use it.
I know that I can check .begin
state but don't know how to keep track of the pan if this condition is true. It seemed like very easy thing to do but I didn't manage to do it.
@objc private func handleSwipe(swipe: UIPanGestureRecognizer) {
if swipe.state == .began && swipe.location(in: self.view).y < self.view.frame.height * 0.15 {
// do something with swipe.translation(in: self.view).y
}
}