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

supportedDrawerPositions not working #348

Open
MichaelJBerk opened this issue Jul 19, 2019 · 4 comments
Open

supportedDrawerPositions not working #348

MichaelJBerk opened this issue Jul 19, 2019 · 4 comments

Comments

@MichaelJBerk
Copy link

I have a project that's based on the demo. However, when I try to set the supportedDrawerPositions like this:

 func supportedDrawerPositions() -> [PulleyPosition] {`
        return [.open]`
}

it doesn't do anything. I've also tried running setNeedsSupportedDrawerPositionsUpdate on ViewWillAppear, but it still doesn't change anything.
All the above code is in the drawerViewController. I have also tried taking the demo and just setting supportedDrawerPositions, and it that works fine.

@amyleecodes
Copy link
Contributor

Is your delegate method being called if you set a breakpoint? If it’s not, it’s possible that a different VC is actually taking the role of this delegate.

This occurs if you’re using a parent view controller such as a navigation controller, tabbar controller, etc. In those cases, the parent VC is the delegate.

@MichaelJBerk
Copy link
Author

It's not triggering the breakpoint. The drawer does have a navigation controller in it, so that might be what's causing the issue

@amyleecodes
Copy link
Contributor

That’s the issue. In that case, the navigation controller is the delegate. You’ll need to subclass it and implement methods there.

@MichaelJBerk
Copy link
Author

Thank you!

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

2 participants