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
bacgrkound Color, Bar Color #11
Comments
@alexookah PagerController is a UIViewController so you can change its background color by setting its view's background color. Same with the bar color, pageSegmentedControl.backgroundColor to change its color. Except with scroll indicator color, there is no public API for that, but what I can do is to expose the pageScrollView. |
thank you very much for your answer. one more question: |
@alexookah Do you mean UIScrollView bounces? After pageScrollView is exposed then you can disable it by setting pageScrollView.bounces = false. func pagerController(_ pagerController: DTPagerController, willChangeSelectedPageIndex index: Int, fromPageIndex oldIndex: Int) {
previousTabIndex = oldIndex // Store previous tab index
} |
no i meant if you are in homePage viewController when you push to a viewcontroller that is PageController. |
@alexookah Okay now I get it now. You should be able to pop back using edge swipe gesture. However, if you still want to disable scrolling, you can use this after pageScrollView being exposed: pageScrollView.isScrollEnabled = false |
but that would disable the functionality scrolling right? and you could switch viewCotnrollers only by using the button. Couldn't just add a functionality to identify geture on the left edge to go back? |
@alexookah Yes exactly! But the scrolling and edge pop gesture are working fine together for me. I will check again soon. |
@alexookah Okay I already checked, everything is working fine. If you want to check, you can add into sample project a button and make it push to another PagerController, you should still be able to go back with pop gesture. |
@alexookah Version 1.1.2 is out. pageScrollView is now accessible. Enjoy! |
These two arguments would be nice as a configuration when creating the PagerController()
let pagerController = PagerController()
pageController.bgColor = UIColor.grey
pageController.scrollIndicatorColor = UIColor.red
The text was updated successfully, but these errors were encountered: