Switch child viewcontrollers programmatically : XLPagerTabStrip
<p>I have been using the XLPagerTabStrip to effectively create a tab bar at the top of my view controller, with multiple child view controllers displayed within it. Lets call Home as parent controller which extends <em>ButtonBarPagerTabStripViewController</em>. There are two child view controller, Child1 and Child2. Everything working perfect as I expected. But now I need a requirement, in which I have to switch child view controllers programmatically. ie, when a process(in child2) finished, it should trigger the switching the tab from Child 2 to Child1. I know there are couple of methods, </p>

<pre><code>func moveToViewController(at index: Int)
func moveToViewController(at index: Int, animated: Bool)
func moveTo(viewController: UIViewController)
func moveTo(viewController: UIViewController, animated: Bool)
</code></pre>

<p>but I don't know how to use it. </p>