|
@@ -19,7 +19,9 @@ final class MeTabBarController: UITabBarController, View {
|
|
|
fileprivate struct Metric {
|
|
|
static let tabBarHeight = 50.f
|
|
|
}
|
|
|
-
|
|
|
+ let bgView = UIView.init().then {
|
|
|
+ $0.backgroundColor = .db_tbbg
|
|
|
+ }
|
|
|
// MARK: Properties
|
|
|
|
|
|
var disposeBag = DisposeBag()
|
|
@@ -49,8 +51,12 @@ final class MeTabBarController: UITabBarController, View {
|
|
|
for: .selected)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ self.tabBar.insertSubview(bgView, at: 0)
|
|
|
self.selectedIndex = 1
|
|
|
self.tabBar.barTintColor = .db_tbbg
|
|
|
+ self.tabBar.tintColor = UIColor("#30B05C")
|
|
|
}
|
|
|
|
|
|
required init?(coder aDecoder: NSCoder) {
|
|
@@ -77,7 +83,6 @@ final class MeTabBarController: UITabBarController, View {
|
|
|
}).disposed(by: disposeBag)
|
|
|
}
|
|
|
|
|
|
-
|
|
|
override func viewDidLayoutSubviews() {
|
|
|
super.viewDidLayoutSubviews()
|
|
|
if #available(iOS 11.0, *) {
|
|
@@ -85,6 +90,7 @@ final class MeTabBarController: UITabBarController, View {
|
|
|
} else {
|
|
|
self.tabBar.height = Metric.tabBarHeight
|
|
|
}
|
|
|
+ self.bgView.frame = CGRect(x: 0, y: 0, width: Int(self.view.width), height: Int(self.tabBar.height))
|
|
|
self.tabBar.bottom = self.view.height
|
|
|
}
|
|
|
}
|