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

Distance isn't remembered after screen rotation #4

Open
smamczak opened this issue Apr 23, 2020 · 5 comments
Open

Distance isn't remembered after screen rotation #4

smamczak opened this issue Apr 23, 2020 · 5 comments

Comments

@smamczak
Copy link

smamczak commented Apr 23, 2020

I downloaded new example v2.0.0 and set the distance but it seams it doesn't stay after screen rotation

self.sd.show(drawer: vc) { config in
    var newConfig = config
    newConfig.distance = 300.0
    return newConfig
}

I think that after the rotation the config should be called once more i.e. if I want to have 75% width in portrait and 50% in landscape

Portrait
Simulator Screen Shot - iPhone 11 - 2020-04-23 at 10 35 26

Landscape
Simulator Screen Shot - iPhone 11 - 2020-04-23 at 10 35 28

@Bruce-pac
Copy link
Owner

I make the the ratio of drawer's distance to screen width after rotation equal to the radio of config's distance to screen width before rotation.

@smamczak
Copy link
Author

I understand. Personally, I would prefer the option of setting a constant width regardless of the screen orientation, but I understand that you want to do it your own way. Alternatively, I will try to figure it out myself.

@Bruce-pac
Copy link
Owner

Maybe I can add a public property to indicate whether distance is absolute or not.

@smamczak
Copy link
Author

Yes, that would be nice

@smamczak
Copy link
Author

@Bruce-pac any updates?

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