前提
MainViewController→TransitionViewに遷移する際に、遷移先のTransitionViewでタブバーを非表示にしたい。
TransitionView→MainViewControllerに戻る際には、タブバーを再表示する。
実装内容
navigationViewControllerにTransitionViewをpushする前に、
MainViewControllerのhidesBottomBarWhenPushedをtrueに設定し、
push後にhidesBottomBarWhenPushedをfalseに設定。
TransitionViewに遷移するコード
self.hidesBottomBarWhenPushed = true //push遷移前に設定
self.navigationController?.pushViewController(transitionView, animated: true)
self.hidesBottomBarWhenPushed = false //push遷移後に設定