Created
February 2, 2018 11:40
-
-
Save michaelevensen/eeaf326139fbfea4d234dec9cf856f3b to your computer and use it in GitHub Desktop.
Custom Height for UITabBar.
This file contains hidden or 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
class CustomTabBar: UITabBar { | |
@IBInspectable var height: CGFloat = 0.0 | |
override func sizeThatFits(_ size: CGSize) -> CGSize { | |
var sizeThatFits = super.sizeThatFits(size) | |
if height > 0.0 { | |
sizeThatFits.height = height | |
} | |
return sizeThatFits | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment