diff --git a/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift b/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift index fc9873bd..56b1a86c 100644 --- a/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift +++ b/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift @@ -22,8 +22,5 @@ public extension TemplateProtocol where Self: ViewController { let templateModel = try decoder.decode(TemplateModel.self, from: data) self.templateModel = templateModel self.pageModel = templateModel as? MVMControllerModelProtocol - if let backgroundColor = templateModel.backgroundColor { - view.backgroundColor = backgroundColor.uiColor - } } } diff --git a/MVMCoreUI/BaseControllers/ViewController.swift b/MVMCoreUI/BaseControllers/ViewController.swift index e9310547..315a0476 100644 --- a/MVMCoreUI/BaseControllers/ViewController.swift +++ b/MVMCoreUI/BaseControllers/ViewController.swift @@ -171,6 +171,10 @@ import UIKit let rules = pageModel?.formRules formValidator = FormValidator(rules) } + + if let backgroundColor = pageModel?.backgroundColor { + view.backgroundColor = backgroundColor.uiColor + } } // MARK: - Navigation Item (Move to model base)