|
@@ -12,7 +12,7 @@
|
|
|
|
|
|
import Foundation
|
|
import Foundation
|
|
|
|
|
|
-class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarControllerDelegate {
|
|
|
|
|
|
+class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate {
|
|
|
|
|
|
private var childCoordinators: [NSObject] = []
|
|
private var childCoordinators: [NSObject] = []
|
|
private var tabBarController: UITabBarController
|
|
private var tabBarController: UITabBarController
|
|
@@ -23,7 +23,6 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC
|
|
self.tabBarController = tabBarController
|
|
self.tabBarController = tabBarController
|
|
self.services = services
|
|
self.services = services
|
|
super.init()
|
|
super.init()
|
|
- self.tabBarController.delegate = self
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(updateTheme), name: .VLCThemeDidChangeNotification, object: nil)
|
|
NotificationCenter.default.addObserver(self, selector: #selector(updateTheme), name: .VLCThemeDidChangeNotification, object: nil)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -34,20 +33,6 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC
|
|
|
|
|
|
@objc func updateTheme() {
|
|
@objc func updateTheme() {
|
|
tabBarController.tabBar.barTintColor = PresentationTheme.current.colors.tabBarColor
|
|
tabBarController.tabBar.barTintColor = PresentationTheme.current.colors.tabBarColor
|
|
- customizeMoreViewController()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- func customizeMoreViewController() {
|
|
|
|
- if let UITabBarCustomizeViewClass = NSClassFromString("UITabBarCustomizeView") {
|
|
|
|
- for subview in tabBarController.view.subviews where subview.isKind(of: UITabBarCustomizeViewClass) {
|
|
|
|
- subview.backgroundColor = PresentationTheme.current.colors.background
|
|
|
|
- subview.tintColor = PresentationTheme.current.colors.orangeUI
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- func tabBarController(_ tabBarController: UITabBarController, willBeginCustomizing viewControllers: [UIViewController]) {
|
|
|
|
- customizeMoreViewController()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
func setupViewControllers() {
|
|
func setupViewControllers() {
|