I have 3 tab and i want to make specific job for each tab : example a want reload the date inside my selected tab by clicking in button in my navigation bar, the problem is the index of selected tab is always wrong . any help ?
Currently public var changeCurrentIndexProgressive: ((oldCell: ButtonBarViewCell?, newCell: ButtonBarViewCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) -> Void)? seems to have problem that always get the previous selected index.
I implement following delegate to get the correct selected index:
public protocol PagerTabStripDelegate: class {
func updateIndicator(for viewController: PagerTabStripViewController, fromIndex: Int, toIndex: Int)
}
public protocol PagerTabStripIsProgressiveDelegate : PagerTabStripDelegate {
func updateIndicator(for viewController: PagerTabStripViewController, fromIndex: Int, toIndex: Int, withProgressPercentage progressPercentage: CGFloat, indexWasChanged: Bool)
}
just get the toIndex value from that
Hey @samirthebti !
You can use the currentIndex property to get the index of the selected tab and then query the viewControllers property to get the selected viewcontroller.
Let me know if there's anything else i can help you with
Cheers
Most helpful comment
Hey @samirthebti !
You can use the
currentIndexproperty to get the index of the selected tab and then query theviewControllersproperty to get the selected viewcontroller.Let me know if there's anything else i can help you with
Cheers