diff --git a/RAMAnimatedTabBarController/RAMAnimatedTabBarController.swift b/RAMAnimatedTabBarController/RAMAnimatedTabBarController.swift index 07913535..83acd83a 100644 --- a/RAMAnimatedTabBarController/RAMAnimatedTabBarController.swift +++ b/RAMAnimatedTabBarController/RAMAnimatedTabBarController.swift @@ -206,7 +206,11 @@ open class RAMAnimatedTabBarController: UITabBarController { } textLabel.backgroundColor = UIColor.clear textLabel.textColor = item.textColor - textLabel.font = UIFont.systemFont(ofSize: item.textFontSize) + if item.fontName.isEmpty { + textLabel.font = UIFont.systemFont(ofSize: item.textFontSize) + } else { + textLabel.font = UIFont(name: item.fontName, size: item.textFontSize)! + } textLabel.textAlignment = NSTextAlignment.center container.addSubview(textLabel) diff --git a/RAMAnimatedTabBarController/RAMAnimatedTabBarItem.swift b/RAMAnimatedTabBarController/RAMAnimatedTabBarItem.swift index e41057d7..c365e3f9 100644 --- a/RAMAnimatedTabBarController/RAMAnimatedTabBarItem.swift +++ b/RAMAnimatedTabBarController/RAMAnimatedTabBarItem.swift @@ -39,7 +39,10 @@ open class RAMAnimatedTabBarItem: UITabBarItem { /// The font used to render the UITabBarItem text. @IBInspectable open var textFontSize: CGFloat = 10 - + + /// The font used to render the UITabBarItem text. + @IBInspectable open var fontName: String = "" + /// The color of the UITabBarItem text. @IBInspectable open var textColor: UIColor = #colorLiteral(red: 0.5079551811, green: 0.5472556715, blue: 0.6011400746, alpha: 1)