Skip to content

Commit

Permalink
Chaging background color doesn't change the TabBar color Cuberto#7
Browse files Browse the repository at this point in the history
  • Loading branch information
rmenezes committed May 8, 2019
1 parent fb36563 commit 63e693c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions BubbleTabBar/Classes/BubbleTabBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ open class BubbleTabBar: UITabBar {
}
}

override open var backgroundColor: UIColor? {
didSet {
barTintColor = backgroundColor
}
}

public override init(frame: CGRect) {
super.init(frame: frame)
configure()
Expand Down
2 changes: 1 addition & 1 deletion Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class ViewController: UIViewController {
settingsVC.inverseColor()

let tabBarController = BubbleTabBarController()

tabBarController.viewControllers = [eventsVC, searchVC, activityVC, settingsVC]
tabBarController.tabBar.tintColor = #colorLiteral(red: 0.1579992771, green: 0.1818160117, blue: 0.5072338581, alpha: 1)
tabBarController.tabBar.backgroundColor = .gray
self.navigationController?.pushViewController(tabBarController, animated: true)
}

Expand Down

0 comments on commit 63e693c

Please sign in to comment.