Skip to content

Commit

Permalink
fixed barTintColor behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
askopin committed Mar 30, 2019
1 parent 521d72f commit ca8e9f5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CBFlashyTabBarController.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'CBFlashyTabBarController'
s.version = '0.8.2'
s.version = '0.8.3'
s.summary = 'One another nice animated tabbar'
s.homepage = 'https://github.com/Cuberto/flashy-tabbar'
s.license = 'MIT'
Expand Down
16 changes: 0 additions & 16 deletions CBFlashyTabBarController/Classes/CBFlashyTabBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,6 @@ open class CBFlashyTabBar: UITabBar {
}
}

public override init(frame: CGRect) {
super.init(frame: frame)
configure()
}

public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
configure()
}

private func configure() {
backgroundColor = UIColor.white
isTranslucent = false
barTintColor = UIColor.white
}

open override var items: [UITabBarItem]? {
didSet {
reloadViews()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ open class CBFlashyTabBarController: UITabBarController {
return
}
let tabBar = CBFlashyTabBar()
tabBar.barTintColor = self.tabBar.barTintColor
if let barTint = self.tabBar.barTintColor {
tabBar.barTintColor = barTint
}
self.setValue(tabBar, forKey: "tabBar")
}

Expand Down
2 changes: 1 addition & 1 deletion CBFlashyTabBarController/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.8.2</string>
<string>0.8.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
1 change: 1 addition & 0 deletions Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
CBFlashyTabBar.appearance().tintColor = #colorLiteral(red: 0.1176470588, green: 0.1176470588, blue: 0.431372549, alpha: 1)
CBFlashyTabBar.appearance().barTintColor = .white
return true
}

Expand Down

0 comments on commit ca8e9f5

Please sign in to comment.