**These methods can be used as following:
Will show how to use these functions through delegate
func moveToViewController(at index: Int) :
You need to pass the index of the target child controller, for this you can either call this func from your child controller by initialising the parent controller or you can set a delegate which will be implemented in your parent controller and should be triggered from your child view controller, ultimately it will select the target controller with animation.
protocol MyDelegate {
func selectChildControllerAtIndex(toIndex: Int!)
func selectViewController(viewController: UIViewController)
}
ChildProcceedPressedDelegate needs to be conformed in your parent controller
In selectViewController you need to pass the reference of your target controller from your child controller, which you can do by storing it somewhere and passing it.
internal func selectViewController(viewController: UIViewController) {
moveTo(viewController: viewController, animated: true)
}
In selectChildControllerAtIndex you just need to pass the index of your target controller:
func selectChildControllerAtIndex( toIndex: Int!) {
self.moveToViewController(at: index, animated: true)
}
func moveToViewController(at index: Int, animated: Bool) :
It works same as above method but in this you can pass if you want to animate to your target controller or not. Use delegate: selectChildControllerAtIndex
func moveTo(viewController: UIViewController)
It works by passing your target child controller reference and it will animate to your target controller.
by delegate: selectViewController
func moveTo(viewController: UIViewController, animated: Bool)
It works by passing your target child controller reference and it will animate as per your choice to your target controller.
by delegate: selectViewController