-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Smooth UIPageViewController integration #12
Comments
Hi @ppamorim! Hmm, this is a super specific use-case. It's definitely possible to do, but it would require a fair bit of effort to access the page view controller's state, and map that to the segmented control. This is a little too specific to be implemented inside the segmented control class. But instead, I'd suggest what you could do is implement your own controller object that is in charge of linking up the segmented control and the page view controller, and handling all of the state between the two. If you wanted to directly attach the segmented control's handle to the page view controller, it would require you to access the internal scroll view of the page view controller. To manually control the position of the handle, you could wrap the I hope that helped! Sorry I couldn't do more! |
@TimOliver Maybe just expose the X position of the current item selected so it's easier to modify? So we don't need to implement anything to handle the internal scroll view action direct. |
That's not a bad idea! It would be pretty easy to make a property like I don't have the time to do commissioned new features, but if you want to try and add it as a PR, I'd be happy to guide you. :) |
Hi @ppamorim! @kim-kiori-d has created a PR with the aim of supporting what you were asking for. If you're still interested in this functionality, would you like to take a look at it? :) |
@TimOliver I will do thanks! |
Hi,
I would like to know if it's possible to use the delegate from
UIPageViewController
to control the X axis movement of this customUISegmentedControl
. This allows smooth transitions of pages.Something like this can be done:
So the
segmentedControl
listens theUIPageViewController
and animate it automatically.Thank you.
The text was updated successfully, but these errors were encountered: