I am trying to update my project to iOS 13. I used to hide the tabbar using a CGAffineTransform translation and it worked like a charm until I updated to Xcode 11 and executed my code on iOS 13.
I have tried recreate a small project with a simple UITabBarController and a simple UIViewController with a button to show/hide my tabbar. (See below).
Even the transformation to identity doesn't works as expected.
Others CGAffineTransform like rotation woks as expected.
@objc fileprivate func showOrHideTabbar() {
if !hidden {
print("hiding")
UIView.animate(withDuration: 0.7, delay: 0, options: .curveEaseOut, animations: {
self.tabBarController?.tabBar.transform = CGAffineTransform(translationX: 0, y: 100)
})
} else {
print("showing")
UIView.animate(withDuration: 0.7, delay: 0, options: .curveEaseOut, animations: {
self.tabBarController?.tabBar.transform = .identity
})
}
hidden = !hidden
}