func displayCurrentTab(_ tabIndex: Int){ | |
if let vc = viewControllerForSelectedSegmentIndex(tabIndex) { | |
self.addChildViewController(vc) | |
vc.didMove(toParentViewController: self) | |
vc.view.frame = self.contentView.bounds | |
self.contentView.addSubview(vc.view) | |
self.currentViewController = vc | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment