allow override of inititalSetup

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-10-11 14:01:08 -05:00
parent 539f42f5ba
commit 0bf344ed31
4 changed files with 5 additions and 9 deletions

View File

@ -79,7 +79,7 @@ open class CollectionView<ModelType: Modelable>: UICollectionView, ModelHandlera
// MARK: - Setup // MARK: - Setup
//-------------------------------------------------- //--------------------------------------------------
public func initialSetup() { open func initialSetup() {
if !initialSetupPerformed { if !initialSetupPerformed {
initialSetupPerformed = true initialSetupPerformed = true
setupUpdateView() setupUpdateView()

View File

@ -52,7 +52,7 @@ open class CollectionViewCell<ModelHandlerType: ModelHandlerable & UIView>: UICo
// MARK: - Setup // MARK: - Setup
//-------------------------------------------------- //--------------------------------------------------
public func initialSetup() { open func initialSetup() {
if !initialSetupPerformed { if !initialSetupPerformed {
initialSetupPerformed = true initialSetupPerformed = true
setup() setup()

View File

@ -23,11 +23,7 @@ open class Control<ModelType: Modelable>: UIControl, ModelHandlerable, ViewProto
// MARK: - Properties // MARK: - Properties
//-------------------------------------------------- //--------------------------------------------------
private var initialSetupPerformed = false private var initialSetupPerformed = false
//if set to true this will call the
//defaultAction() in the class
public var executeDefaultAction = true
@Proxy(\.model.surface) @Proxy(\.model.surface)
open var surface: Surface open var surface: Surface
@ -78,7 +74,7 @@ open class Control<ModelType: Modelable>: UIControl, ModelHandlerable, ViewProto
// MARK: - Setup // MARK: - Setup
//-------------------------------------------------- //--------------------------------------------------
public func initialSetup() { open func initialSetup() {
if !initialSetupPerformed { if !initialSetupPerformed {
initialSetupPerformed = true initialSetupPerformed = true
setupUpdateView() setupUpdateView()

View File

@ -74,7 +74,7 @@ open class View<ModelType: Modelable>: UIView, ModelHandlerable, ViewProtocol, R
// MARK: - Setup // MARK: - Setup
//-------------------------------------------------- //--------------------------------------------------
public func initialSetup() { open func initialSetup() {
if !initialSetupPerformed { if !initialSetupPerformed {
initialSetupPerformed = true initialSetupPerformed = true
setupUpdateView() setupUpdateView()