Xlpagertabstrip: how can i add childviewcontroller programmatically

Created on 6 Apr 2017  路  1Comment  路  Source: xmartlabs/XLPagerTabStrip

question awaiting response

Most helpful comment

Hi @freddy2013,

In order to add a new child view controller you need to refresh the entire PagerTabStripController. In order to do that, you have to call to PagerTabStripController.reloadPagerTabStripView which will call your implementation of func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController].

Take into account that you might avoid re-creating all child controllers each time viewControllers(for:) -> [UIViewController] is called.

Regards

>All comments

Hi @freddy2013,

In order to add a new child view controller you need to refresh the entire PagerTabStripController. In order to do that, you have to call to PagerTabStripController.reloadPagerTabStripView which will call your implementation of func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController].

Take into account that you might avoid re-creating all child controllers each time viewControllers(for:) -> [UIViewController] is called.

Regards

Was this page helpful?
0 / 5 - 0 ratings