Skip to content
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

Is there any way to set default viewController? #553

Open
vahids opened this issue Mar 16, 2018 · 2 comments
Open

Is there any way to set default viewController? #553

vahids opened this issue Mar 16, 2018 · 2 comments

Comments

@vahids
Copy link

vahids commented Mar 16, 2018

Info Value
XLPagerTabStrip 8
Xcode 9.2
iOS 11

Is there any way to set default view controller instead of first one?

This line of code works but only in viewDidAppear I want to work in viewDidLoad in initialization.

moveToViewController(at: viewControllers.count - 1, animated: false)

I looked in code and find out that moveToViewController(at: preCurrentIndex) called in viewDidAppear so It will override that code my code in viewDidLoad.

Is it a bad Idea to change currentIndex to public and set it in my

View Controller >> viewDidLoad >> after super.viewDidLoad?

Thanks,
Vahid

@Desgard
Copy link

Desgard commented Mar 19, 2018

This is my solution: Sepicat@81f3b87

@balkarov
Copy link

balkarov commented Mar 9, 2019

Solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants