Gif showing issue: https://cl.ly/1c1Q1Q2L2l3i
I have an issue where the tab bar isn't fading away when transitioning to a view where the 'Hide Bottom Bar on Push' option is enabled. It's just disappearing at the end of the transition.
I've searched around but can't find anything related. Any help?
I'm having this issue to - did you manage to find a solution @djdmorrison ?
@edd677 - Nope, unfortunately not yet
Having the same issue.
Having the same issue as well.
Hey all 馃憢
I too am seeing the same problem... have got a workaround in place for my use case which works perfectly though 馃憣
In short it just came down to managing the tab bar's animation myself. Here's a simple function for sliding the tab bar up/down to show/hide it.
extension UITabBarController {
func setTabBarVisible(_ visible: Bool, animated: Bool = true, completion: (() -> Void)? = nil) {
// No State Change
if isTabBarVisible == visible {
completion?()
return
}
let frame = tabBar.frame
let height = frame.height
let offset = visible ? -height : height
let duration = animated ? 0.3 : 0
UIView.animate(withDuration: duration, animations: {
self.tabBar.frame = frame.offsetBy(dx: 0, dy: offset)
}, completion: { success in
completion?()
})
}
var isTabBarVisible: Bool {
return tabBar.frame.origin.y < view.frame.maxY
}
}
Within my prepare(for:sender:) function I then hide the tab bar using my function. Within viewWillAppear I then show it again.
As I say, not beautiful but it does work alongside Hero and I'm happy with the results.
Most helpful comment
Having the same issue as well.