Change nav bar so that if it is hidden and animating itself showing, you don't see the navbar items moving into place.

This commit is contained in:
Maurice Parker 2019-11-23 18:00:51 -06:00
parent d7c3f1ee19
commit d8b324e3da
1 changed files with 13 additions and 0 deletions

View File

@ -82,9 +82,22 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
}
override func viewWillAppear(_ animated: Bool) {
// If the nav bar is hidden, fade it in to avoid it showing stuff as it is getting laid out
if navigationController?.navigationBar.isHidden ?? false {
navigationController?.navigationBar.alpha = 0
}
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(true)
coordinator.isTimelineViewControllerPending = false
if navigationController?.navigationBar.alpha == 0 {
UIView.animate(withDuration: 0.5) {
self.navigationController?.navigationBar.alpha = 1
}
}
}
// MARK: Actions