Just like Apple maps, The main information sheet view is a sliding view that sits on top of the MKMapView. It contains a UITableView. It has three states fully open, half open and closed.
When in half open state, if user starts dragging the sheet up, the entire sheet drags till fully open state and if user further drags the sheet up, the UITableView contents starts scrolling, Notice that user has not still lift the finger up So there is no touches ended event, It is a continuous interaction with the sheet.
My setup:
The sheet which contains the UITableView has a UIPanGestureRecognizer setup to drag the sheet up and down.
Initially when the sheet is half open, I tried disabling the user interaction on UITableView by setting isUserInteractionEnabled = false. So now I am able to pan the sheet up, When reaching the fully open state, I stop panning the sheet and set the isUserInteractionEnabled = true for UITableView. But my problem is that UITableView responds to the next touch events when user lifts the finger and again interacts with it.
How can I make scroll when user has not lift the finger up?
I have even tried changing scrollEnabled property of UITableView instead of isUserInteractionEnabled property, but it gives same results.
I also tried tableView.panGesureRecognizer.isEnabled property, but it didn’t work.
I found this similar question,
StackOverflow
but there is no answer.
It is the default functionality in Apple Maps.
Any suggestions how to achieve this functionality?