Xlpagertabstrip: Move to second child VC from first child VC on button click

Created on 15 Oct 2018  路  2Comments  路  Source: xmartlabs/XLPagerTabStrip

Hi,

Actually my requirement is to show second child VC from first child VC on the button click. I have gone through the docs as well as issues but wasn't able to get help from them. Any help will be appreciated. Thanks.

Most helpful comment

  1. Create a var that equals to PagerTabStripViewController().
  2. Then set that var inside the indicatorInfo. Like this:

func indicatorInfo(for pagerTabStripController: PagerTabStripViewController) -> IndicatorInfo {
pagerStrip = pagerTabStripController
return itemInfo
}

  1. Inside the action method:
    pagerStrip.moveToViewController(at: 1, animated: true)

All 2 comments

  1. Create a var that equals to PagerTabStripViewController().
  2. Then set that var inside the indicatorInfo. Like this:

func indicatorInfo(for pagerTabStripController: PagerTabStripViewController) -> IndicatorInfo {
pagerStrip = pagerTabStripController
return itemInfo
}

  1. Inside the action method:
    pagerStrip.moveToViewController(at: 1, animated: true)

@kmmpaliza I want to move to third view controller using moveToViewController(at: index), but does not work. It happen with any index which pass

Was this page helpful?
0 / 5 - 0 ratings