From 6a7a279a90c172bbba70929a45d8ab6db578ba3d Mon Sep 17 00:00:00 2001 From: Carola Nitz Date: Sat, 21 Apr 2018 19:54:41 +0200 Subject: [PATCH] MoreViewController: remove unneeded code --- Sources/AppearanceManager.swift | 9 --------- Sources/VLCTabBarCoordinator.swift | 17 +---------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/Sources/AppearanceManager.swift b/Sources/AppearanceManager.swift index f1a409ca..5a3a09d0 100644 --- a/Sources/AppearanceManager.swift +++ b/Sources/AppearanceManager.swift @@ -41,14 +41,5 @@ class AppearanceManager: NSObject { UISearchBar.appearance().barTintColor = .white 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 - } } } diff --git a/Sources/VLCTabBarCoordinator.swift b/Sources/VLCTabBarCoordinator.swift index 279c6ecc..b446000e 100644 --- a/Sources/VLCTabBarCoordinator.swift +++ b/Sources/VLCTabBarCoordinator.swift @@ -12,7 +12,7 @@ import Foundation -class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarControllerDelegate { +class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate { private var childCoordinators: [NSObject] = [] private var tabBarController: UITabBarController @@ -23,7 +23,6 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC self.tabBarController = tabBarController self.services = services super.init() - self.tabBarController.delegate = self NotificationCenter.default.addObserver(self, selector: #selector(updateTheme), name: .VLCThemeDidChangeNotification, object: nil) } @@ -34,20 +33,6 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC @objc func updateTheme() { 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() { -- GitLab