Commit 6a7a279a authored by Carola Nitz's avatar Carola Nitz

MoreViewController: remove unneeded code

parent 13c8cf7e
...@@ -41,14 +41,5 @@ class AppearanceManager: NSObject { ...@@ -41,14 +41,5 @@ class AppearanceManager: NSObject {
UISearchBar.appearance().barTintColor = .white UISearchBar.appearance().barTintColor = .white
UITabBar.appearance().tintColor = theme.colors.orangeUI UITabBar.appearance().tintColor = theme.colors.orangeUI
//customization of MoreViewController
//Since there is no clean way to customize the Morecontroller appearance we're getting the class
if let moreListControllerClass = NSClassFromString("UIMoreListController") as? UIAppearanceContainer.Type {
UITableViewCell.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).backgroundColor = theme.colors.cellBackgroundA
UITableViewCell.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).textLabel?.textColor = theme.colors.cellTextColor
UITableView.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).backgroundColor = theme.colors.background
UITableView.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).separatorColor = .lightGray
UILabel.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).textColor = theme.colors.cellTextColor
}
} }
} }
...@@ -12,7 +12,7 @@ ...@@ -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 ...@@ -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 ...@@ -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() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment