xmartlabs / XLPagerTabStrip

Android PagerTabStrip for iOS.
MIT License
6.97k stars 1.32k forks source link

Is it possible to show second index(secondtab) based on some condition ? #813

Closed sarojtiwari closed 3 years ago

sarojtiwari commented 3 years ago

I want to check access token and if access token is present I need to select second tab. Any way to do this. since current index is private var and can't be set.

Some function such as moveToViewController function also doesn't work for this scenario.

sarojtiwari commented 3 years ago
DispatchQueue.main.async {
                self.moveToViewController(at: 1, animated: false)
            }

Turns out this will work completely fine.