In portrait app landscape required
Closed this issue · 3 comments
I'm developing an application in which only portrait orientation is available. When I started using the library I found the problem. It seemed to me that I should not override the variable pullUpControllerPreferredLandscapeFrame
.
But when I override only pullUpControllerPreferredSize
and run my application I saw that the frame of the PullUpController was inherited from super definition of pullUpControllerPreferredLandscapeFrame
. Something going wrong inside of controller. That was really confused for me.
I hope this feedback will help you make your library better.
Hi @fixique and thanks for the feedback.
Could you please provide an example of the issue?
The only problem I could see is in the function
refreshConstraints(newSize: CGSize, resetTop: Bool = true)
because in order to know if the view is in landscape or portrait newSize.height
and newSize.width
are checked.
So if your device is in portrait but the parent view of the pull up controller has newSize.width < newSize.height
the controller will assume that your device is in landscape mode.
What do you think?
Hi again @MarioIannotta sorry again for really long replay. Yes I think it is because this function refreshConstraints(newSize: CGSize, resetTop: Bool = true)
, but after I realize this and fix with some code, I can reproduce this bug again.
Maybe this is due to the fact that I use xib maybe something else.
When my viewController load and i try to present PullUpController on this method I have newSize = 600, 600
.
I fix this by set frame for super view controller with screen bounds.
I think we can close this issue.
Ok, closing the issue then. If you have any idea on how to fix this issue, please let me know.