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
Get current controller with InfiniteDataSource #224
Comments
Hi @mimmo00! You can get the currently selected view controller using the
Does that work for you? |
Thanks @rechsteiner for the answer. I use it to get the scroll of the pages. Two questions:
Thanks a lot! |
Yeah, that's correct
Yes, this delegate should also be called if the user selects the items in the menu 🙂 |
Thanks! |
Hi @rechsteiner , unfortunately the delegate is not called on startup. it is only called when you scroll or select a menu item. So I have not found a solution yet :( |
Hi 👋 If you need the initially selected view controller you should be able to read that directly on the page view controller like this:
Does that work for you? |
Thanks, but in ViewDidAppear it is nil
I need to replicate this on start: `
} Thanks a lot |
@rechsteiner maybe the problem is that I'm using a subclass of PagingViewController?
|
Using a subclass shouldn't be a problem. The view controller is not added before override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
print(pagingViewController.pageViewController.selectedViewController)
}
|
Yes, I tried everything inside
Thanks! |
Can you try calling |
Yes, I tried again now. If I'm logged in, it crash because it loads the listing from server. If I am not logged in, the empty status appears without problems. Probably it is some strange logic of the listing to cause the error, not the library :) |
Hi, congratulations for the framework!
I'm using the InfiniteDataSource. I can set the variables of controller during the initial setting.
`extension ContainerViewController: PagingViewControllerInfiniteDataSource {
...`
How can I communicate with the current controller later?
Thanks
The text was updated successfully, but these errors were encountered: