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

drawer content stations bellow lowest stop #54

Closed
Carcinie opened this issue Jul 7, 2017 · 7 comments
Closed

drawer content stations bellow lowest stop #54

Carcinie opened this issue Jul 7, 2017 · 7 comments

Comments

@Carcinie
Copy link

Carcinie commented Jul 7, 2017

Summary:

The drawer is dropping and staying below where it is supposed to go.
When I start the app, the drawer is in the right position, but when I move the pulley up, let go, and then down all the way, it shows less than when it started.

What it should do:

The pulley should get back to the original position.

Details:

collapsedDrawerHeight = partialRevealDrawerHeight
and
supportedDrawerPositions = PulleyPosition.all

@amyleecodes
Copy link
Contributor

amyleecodes commented Jul 7, 2017

collapsedDrawerHeight = partialRevealDrawerHeight

This is not a supported setting.

There is math that relies on these numbers not being the same. If you don't need separate positions for collapsed and partial reveal, then use a supportedDrawerPositions array that omits the partial reveal position.

supportedDrawerPositions = PulleyPosition.all

This configuration also includes the 'closed' drawer mode, which will position it lower (likely offscreen, depending on the way it's setup). This could also play into the issue you're seeing.

@Carcinie
Copy link
Author

Carcinie commented Jul 7, 2017

I have tried

collapsed position = X
partialRevealDrawerHeight = X + 1

supportedDrawerPositions = [PulleyPosition.collapsed,PulleyPosition.open]

and I still see the problem.

I have added a short video to show it:
https://youtu.be/RmiaGqME4SM

I also notice that the slider doesn't snap to the extremeties. I don't know if that is normal, from looking at the code, it looks like when you slide the drawer in one direction it should snap to the closest extremity, and it doesn't do that.

*Note, I am not using a TabController. I am using a tabbar on a normal UIViewController, so they have no interaction, one is simply on top of the other. I set the collapsed slider position to be 49 * 2.3 (49 is the size of the tabbar) so it can show.

@amyleecodes
Copy link
Contributor

Can you test the code compiled against the iOS 10 SDK, running in an iOS 10 simulator? That looks like iOS 11, which has changed a lot of how layout guides and margins work. Pulley isn't currently ready to be built with the iOS 11 SDK.

@amyleecodes
Copy link
Contributor

If it still happens on iOS 10, please provide a sample project and I'll see if I can figure out what it's doing and/or how to work around it.

@Carcinie
Copy link
Author

Carcinie commented Jul 8, 2017

I deployed on iOS 10.3 and yes, it works in that it doesn't go all the way to the bottom now. Thanks!

Something else I noticed, even on 10.3, is that I am able to move the drawer from the mainContentVC.
So even though I am not touching the drawer I am able to move it up and down, and I can't move the tableView cells on the mainContentVC.

I'm not sure what I am doing wrong.

@amyleecodes
Copy link
Contributor

Good to hear it works properly (regarding the bottom) on 10.3 for you.

Try the demo project and see if there are any significant differences in your implementation. The demo project has a scrollable map behind it, and it scrolls without affecting the drawer. A tableview, etc. should scroll normally behind the drawer.

@Carcinie
Copy link
Author

Carcinie commented Jul 8, 2017

Alright, so I see it doesn't like having the pulleycontroller not be the root view controller.
Setting it as root and it works, but now I need to add the tabbar into that view.
I subclassed PulleyViewController.swift added the tabbar and it works flawlessly. (Just in case anyone else would like to use a tabbar, it's possible.)

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