-
Notifications
You must be signed in to change notification settings - Fork 18
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
CustomSplitter disappears when constraints is set #30
Comments
This behavior is by design. The reason is explained in the README:
It perhaps seems like an unnecessary restriction, but this issue:
is pretty much baked into the
While you're dragging, we need to keep the fraction within the constraints, so if the splitter is visible but outside of the constraints, then the first execution of the
The jump-on-drag behavior used to be easy to see by commenting this line out, but doing that now leaves a |
Looking into this, I see there is a bug which unfortunately doesn't help on your issue. If you specify constraints without
This fixes the gap I noted above in "The jump-on-drag behavior used to be easy to see by commenting this line out, but doing that now leaves a visibleWidth gap for the Splitter but it still isn't draggable. " If you want to override the Splitter becoming completely hidden, you can return Thanks for bringing the original issue up. Hope the explanation was useful. |
First of all thank you for the detailed response. It is hard to understand and shows the amount of validations you had to deal with in order to make the Splitter's crawl behavior feel natural. This library is very helpful and from my point of view it is important that it is close to the usual behavior as shown in the following image. If you can achieve exactly the behavior shown here natively in this library that would be great. Otherwise I prefer to remove the constraints (minSFraction for my case). Tell me what you think? |
Oh, I see, and I think you are right. My goal in implementing the drag-to-hide feature was to support the native behavior seen in Xcode and elsewhere. I hope to have some time over the next week to do this fix. Your video made me realize that the "previewHide" toggle that I did for the drag-to-hide feature works just as well to fix the problem I was having with the "jump to constraints" issue before, so I'm hoping it won't be too difficult. |
When I add .constraints(minPFraction:minSFraction) the CustomSplitter disappears. Which should not happen.
Sample code:
Is there something I am doing wrong or how can I solve it?
Thanks in advance
The text was updated successfully, but these errors were encountered: