Closed vinodiOS closed 7 years ago
@vinodiOS you can do this pretty easily by utilising the PageboyViewControllerDelegate
. When a page is scrolled to, you can use the currentViewController
property to access the visible child view controller and update the parent navigation title.
Something like this:
func pageboyViewController(_ pageboyViewController: PageboyViewController,
didScrollToPageAt index: Int,
direction: PageboyViewController.NavigationDirection,
animated: Bool) {
let childTitle = pageboyViewController.currentViewController?.title
pageboyViewController.navigationItem.title = childTitle
}
Thank you @msaps
I want to change title of child controllers when they scrolled or navigated using barItemButtons.