For iOS 13, behavior for the UITabBar has changed for animations. You can no longer use CGAffineTransform and instead you should animate its frame position instead. Make the following changes in the two functions below:
override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { UIView.animate(withDuration: 0.7, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0.7, options: .curveEaseOut, animations: { // ... // self.tabBarController?.tabBar.transform = CGAffineTransform(translationX: 0, y: 100) self.tabBarController?.tabBar.frame.origin.y = self.view.frame.size.height } }
@objc func handleRemoveRedView() { // ... //self.tabBarController?.tabBar.transform = .identity if let tabBarFrame = self.tabBarController?.tabBar.frame { self.tabBarController?.tabBar.frame.origin.y = self.view.frame.size.height - tabBarFrame.height } }