code comments
This commit is contained in:
parent
691bb1a781
commit
e7546a9144
@ -145,7 +145,7 @@ import Foundation
|
||||
hideBorders = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideBorders) ?? false
|
||||
baseValue = text
|
||||
fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey)
|
||||
shouldMaskRecordedView = try typeContainer.decode(Bool.self, forKey: .shouldMaskRecordedView)
|
||||
shouldMaskRecordedView = try typeContainer.decodeIfPresent(Bool.self, forKey: .shouldMaskRecordedView) ?? shouldMaskRecordedView
|
||||
if let groupName = try typeContainer.decodeIfPresent(String.self, forKey: .groupName) {
|
||||
self.groupName = groupName
|
||||
}
|
||||
|
||||
@ -26,8 +26,7 @@ public extension TemplateProtocol where Self: ViewController {
|
||||
model = templateModel as? MVMControllerModelProtocol
|
||||
guard let model = model else { return }
|
||||
traverseAndAddRequiredBehaviors()
|
||||
var behaviorHandler = self
|
||||
behaviorHandler.createBehaviors(for: model, delegateObject: delegateObjectIVar)
|
||||
self.behaviors = createBehaviors(for: model, delegateObject: delegateObjectIVar)
|
||||
MVMCoreUISession.sharedGlobal()?.applyGlobalBehaviors(to: self)
|
||||
}
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
||||
|
||||
open override func viewForTop() -> UIView {
|
||||
guard let headerModel = templateModel?.header,
|
||||
let molecule = generateMoleculeView(from: headerModel)
|
||||
let molecule = generateMoleculeView(from: headerModel)
|
||||
else { return super.viewForTop() }
|
||||
|
||||
// Temporary, Default the horizontal padding
|
||||
|
||||
@ -230,7 +230,7 @@ import UIKit
|
||||
let navigationItem = createDefaultLegacyNavigationModel()
|
||||
model?.navigationBar = navigationItem
|
||||
}
|
||||
self.model?.template
|
||||
|
||||
executeBehaviors { (behavior: PageMoleculeTransformationBehavior) in
|
||||
behavior.onPageNew(rootMolecules: getRootMolecules(), delegateObjectIVar)
|
||||
}
|
||||
|
||||
@ -13,9 +13,9 @@ public protocol PageBehaviorHandlerProtocol {
|
||||
|
||||
public extension PageBehaviorHandlerProtocol {
|
||||
/// Creates the behaviors and sets the variable.
|
||||
mutating func createBehaviors(for model: PageBehaviorHandlerModelProtocol, delegateObject: MVMCoreUIDelegateObject?) {
|
||||
func createBehaviors(for model: PageBehaviorHandlerModelProtocol, delegateObject: MVMCoreUIDelegateObject?) -> [PageBehaviorProtocol] {
|
||||
guard let behaviorModels = model.behaviors else {
|
||||
return
|
||||
return []
|
||||
}
|
||||
|
||||
var behaviors: [PageBehaviorProtocol] = []
|
||||
@ -32,8 +32,6 @@ public extension PageBehaviorHandlerProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
if behaviors.count > 0 {
|
||||
self.behaviors = behaviors + (self.behaviors ?? [])
|
||||
}
|
||||
return behaviors
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user