Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPad panel mode - the map area is not touchable when adding Pulley programmatically #361

Open
az-oolloow opened this issue Sep 23, 2019 · 0 comments

Comments

@az-oolloow
Copy link

I tried adding Pulley with Carthage, and while it sort of works, i can't tap the map that i drew behind the drawer.

e.g.

class MyViewController: UIViewController {
    override func viewDidLoad() {
                let drawer: UIViewController = UIViewController()
        drawer.view.backgroundColor = .red
        
        let main = UIViewController()
        let mv = MKMapView()
        mv.translatesAutoresizingMaskIntoConstraints = false
        main.view.addSubview(mv)
        mv.leftAnchor.constraint(equalTo: main.view.leftAnchor).isActive = true
        mv.rightAnchor.constraint(equalTo: main.view.rightAnchor).isActive = true
        mv.topAnchor.constraint(equalTo: main.view.topAnchor).isActive = true
        mv.bottomAnchor.constraint(equalTo: main.view.bottomAnchor).isActive = true
        
        let pulley = PulleyViewController(contentViewController: main, drawerViewController: drawer)
        pulley.allowsUserDrawerPositionChange = false
        pulley.displayMode = .automatic
        pulley.panelCornerPlacement = .topRight
        
        pulley.view.translatesAutoresizingMaskIntoConstraints = false
        self.view.addSubview(pulley.view)
        pulley.view.leftAnchor.constraint(equalTo: self.view.leftAnchor).isActive = true
        pulley.view.rightAnchor.constraint(equalTo: self.view.rightAnchor).isActive = true
        pulley.view.topAnchor.constraint(equalTo: self.view.topAnchor).isActive = true
        pulley.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
    }
}
```
The area below my red drawer can't be interacted with, e.g. if i double tap it then the mapview doesn't zoom in. It seems that the `PulleyPassthroughScrollView` doesn't pass the hits down somehow.

It works fine in demo app, but that uses Storyboards.

Any ideas on what i did wrong?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant