Last active
October 10, 2024 07:06
-
-
Save calt/7ea29a65b440c2aa8a1a to your computer and use it in GitHub Desktop.
UITabBar with custom height in Swift, does not work for iOS 14 or later.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Does not work on iOS 14.0 or later, keeping the gist just for reference. | |
extension UITabBar { | |
override open func sizeThatFits(size: CGSize) -> CGSize { | |
super.sizeThatFits(size) | |
var sizeThatFits = super.sizeThatFits(size) | |
sizeThatFits.height = 71 | |
return sizeThatFits | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After testing many ways, this one works best for me: