Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 4 additions & 1 deletion RAMAnimatedTabBarController/RAMAnimatedTabBarItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down