diff --git a/VDSSample/ViewControllers/BaseViewController.swift b/VDSSample/ViewControllers/BaseViewController.swift index 3aadef4..f268703 100644 --- a/VDSSample/ViewControllers/BaseViewController.swift +++ b/VDSSample/ViewControllers/BaseViewController.swift @@ -66,7 +66,7 @@ public class FormSection: UIStackView { } } -public class BaseViewController: UIViewController, Initable { +public class BaseViewController: UIViewController, Initable , CustomRotorable { deinit { print("\(Self.self) deinit") } @@ -81,6 +81,12 @@ public class BaseViewController: UIViewController, Initable { // MARK: - Combine Properties //-------------------------------------------------- public var subscribers = Set() + + public var customRotorCache: [String: [UIView]] = [:] + public var customRotors: [CustomRotorType] = [ + CustomRotorType(name: "Links", trait: .link), + CustomRotorType(name: "Buttons", trait: .button) + ] //-------------------------------------------------- // MARK: - Properties @@ -117,6 +123,7 @@ public class BaseViewController: UIViewController, Initable { setup() contentTopView.backgroundColor = Surface.light.color } + } public lazy var surfacePickerSelectorView = { @@ -229,6 +236,8 @@ public class BaseViewController: UIViewController, Initable { self?.activeTextField?.resignFirstResponder() self?.activeTextField = nil }.store(in: &subscribers) + + loadCustomRotors() } func isViewHiddenByKeyboard(view: UIView, keyboardFrame: CGRect) -> Bool {