move backgroud color set to handleNewData

This commit is contained in:
Suresh, Kamlesh 2020-05-08 17:27:10 -04:00
parent 38e9141810
commit f06da5e379
2 changed files with 4 additions and 3 deletions

View File

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

View File

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