applidium / OverlayContainer

Non-intrusive iOS UI library to implement overlay based interfaces
https://gaetanzanella.github.io/2018-12-17/replicating-apple-maps-overlay
Other
1.15k stars 94 forks source link

First tap in UITableView after dragging up or down is ignored #30

Closed irlennard closed 4 years ago

irlennard commented 5 years ago

I have found an issue where if your overlay view controller contains a table view and drives the swipe up/down, after the up/down animation is complete (after overlayContainerViewController(containerViewController: _, willTranslateOverlay: _, transitionCoordinator: _)) the first tap on the table view doesn't register. You need to tap again. You can also see that the scroll indicator stays visible and doesn't disappear as it should. You can see this behaviour in your example project with BackdropExampleViewController.

gaetanzanella commented 5 years ago

I'm working on it but I haven't found a solution yet. Overriding the content offset of a UITableView creates a conflit with its internal gesture management.

Interestingly, it is also visible in the native Maps app.

ezgif com-resize (3)

irlennard commented 5 years ago

Ok, thanks for the info!

gaetanzanella commented 5 years ago

For the scroll indicator, you can hide it each time the container is dragged

    func overlayContainerViewController(_ containerViewController: OverlayContainerViewController,
                                        willStartDraggingOverlay overlayViewController: UIViewController) {
        self.tableView.showsVerticalScrollIndicator = false
    }

    func overlayContainerViewController(_ containerViewController: OverlayContainerViewController,
                                        didMoveOverlay overlayViewController: UIViewController,
                                        toNotchAt index: Int) {
        self.tableView.showsVerticalScrollIndicator = true
    }
gaetanzanella commented 4 years ago

It seems to be fixed in iOS 13. I guess they changed the UIScrollView implementation.