Browse Source

MoreViewController: remove unneeded code

Carola Nitz 7 years ago
parent
commit
6a7a279a90
2 changed files with 1 additions and 25 deletions
  1. 0 9
      Sources/AppearanceManager.swift
  2. 1 16
      Sources/VLCTabBarCoordinator.swift

+ 0 - 9
Sources/AppearanceManager.swift

@@ -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
-        }
     }
     }
 }
 }

+ 1 - 16
Sources/VLCTabBarCoordinator.swift

@@ -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() {