From 0bf344ed313ce18090eef0d8e28f5ebdfc67a476 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 11 Oct 2022 14:01:08 -0500 Subject: [PATCH] allow override of inititalSetup Signed-off-by: Matt Bruce --- VDS/Classes/CollectionView.swift | 2 +- VDS/Classes/CollectionViewCell.swift | 2 +- VDS/Classes/Control.swift | 8 ++------ VDS/Classes/View.swift | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/VDS/Classes/CollectionView.swift b/VDS/Classes/CollectionView.swift index e0b1ab57..7a163e9d 100644 --- a/VDS/Classes/CollectionView.swift +++ b/VDS/Classes/CollectionView.swift @@ -79,7 +79,7 @@ open class CollectionView: UICollectionView, ModelHandlera // MARK: - Setup //-------------------------------------------------- - public func initialSetup() { + open func initialSetup() { if !initialSetupPerformed { initialSetupPerformed = true setupUpdateView() diff --git a/VDS/Classes/CollectionViewCell.swift b/VDS/Classes/CollectionViewCell.swift index 536053b1..881665f2 100644 --- a/VDS/Classes/CollectionViewCell.swift +++ b/VDS/Classes/CollectionViewCell.swift @@ -52,7 +52,7 @@ open class CollectionViewCell: UICo // MARK: - Setup //-------------------------------------------------- - public func initialSetup() { + open func initialSetup() { if !initialSetupPerformed { initialSetupPerformed = true setup() diff --git a/VDS/Classes/Control.swift b/VDS/Classes/Control.swift index 50283184..227d550e 100644 --- a/VDS/Classes/Control.swift +++ b/VDS/Classes/Control.swift @@ -23,11 +23,7 @@ open class Control: UIControl, ModelHandlerable, ViewProto // MARK: - Properties //-------------------------------------------------- private var initialSetupPerformed = false - - //if set to true this will call the - //defaultAction() in the class - public var executeDefaultAction = true - + @Proxy(\.model.surface) open var surface: Surface @@ -78,7 +74,7 @@ open class Control: UIControl, ModelHandlerable, ViewProto // MARK: - Setup //-------------------------------------------------- - public func initialSetup() { + open func initialSetup() { if !initialSetupPerformed { initialSetupPerformed = true setupUpdateView() diff --git a/VDS/Classes/View.swift b/VDS/Classes/View.swift index 5883930f..57ac207b 100644 --- a/VDS/Classes/View.swift +++ b/VDS/Classes/View.swift @@ -74,7 +74,7 @@ open class View: UIView, ModelHandlerable, ViewProtocol, R // MARK: - Setup //-------------------------------------------------- - public func initialSetup() { + open func initialSetup() { if !initialSetupPerformed { initialSetupPerformed = true setupUpdateView()