@@ -14,14 +14,11 @@ protocol AppearanceManagerProtocol {
1414}
1515
1616public enum AppearanceManager {
17-
1817 static func getComponentName( _ appearanceName: String ) -> ( String , String ? ) {
1918 let components = appearanceName. components ( separatedBy: " : " )
20-
2119 if components. count > 1 {
2220 return ( components. first!, components. last)
2321 }
24-
2522 return ( appearanceName, nil )
2623 }
2724
@@ -33,7 +30,7 @@ public enum AppearanceManager {
3330 if let themeObj: ThemeModel = theme. value as? ThemeModel {
3431
3532 let components = getComponentName ( theme. key)
36-
33+ // Setup 'appearance' from Theme
3734 if let classTy: AppearanceManagerProtocol = Reflection . swiftClassFromString ( components. 0 ) as? AppearanceManagerProtocol {
3835
3936 var appearanceContainer : [ UIAppearanceContainer . Type ] ?
@@ -50,19 +47,6 @@ public enum AppearanceManager {
5047 }
5148}
5249
53- extension ThemesManager {
54-
55- public static func setStatusBarBackgroundColor( _ color: UIColor ? ) {
56-
57- if
58- let color = color,
59- let statusBar: UIView = UIApplication . shared. value ( forKey: " statusBar " ) as? UIView ,
60- statusBar. responds ( to: #selector( setter: UIView . backgroundColor) ) {
61- statusBar. backgroundColor = color
62- }
63- }
64- }
65-
6650extension UIView : AppearanceManagerProtocol {
6751
6852 public func setUpAppearance( theme: ThemeModel , containerClass: [ UIAppearanceContainer . Type ] ? ) -> UIAppearance {
@@ -161,7 +145,7 @@ extension UINavigationBar {
161145 }
162146
163147 override public class func setBackgroundImage( _ image: Any ) {
164-
148+ // defaultImage
165149 var defaultImage : UIImage ? = ThemesManager . getImage ( image)
166150 var landScapeImage : UIImage ?
167151
@@ -177,11 +161,8 @@ extension UINavigationBar {
177161}
178162
179163extension UITabBar {
180-
181164 override public class func setBackgroundImage( _ image: Any ) {
182-
183165 let appearance = self . appearance ( )
184-
185166 if let defaultImage = ThemesManager . getImage ( image) {
186167 appearance. backgroundImage = defaultImage
187168 }
0 commit comments