Last active
January 9, 2024 05:58
-
-
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 | |
} | |
} |
@Wei18 Thank you man it works like a charm!
@Wei18 you are a champ
@Wei18 Thank you that's work for me too on iOS 14+
@Wei18 thank you! still working for swift 5+
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@RemiRodrigues Thanks, you really saved me a lot of headaches.