diff --git a/VDS/Classes/Control.swift b/VDS/Classes/Control.swift index 1eca6467..79a26591 100644 --- a/VDS/Classes/Control.swift +++ b/VDS/Classes/Control.swift @@ -9,7 +9,7 @@ import Foundation import UIKit import Combine - +@objc(VDSControl) open class Control: UIControl, Handlerable, ViewProtocol, Resettable { //-------------------------------------------------- diff --git a/VDS/Classes/View.swift b/VDS/Classes/View.swift index c8304ccb..1a08301a 100644 --- a/VDS/Classes/View.swift +++ b/VDS/Classes/View.swift @@ -10,6 +10,7 @@ import UIKit import Combine +@objc(VDSView) open class View: UIView, Handlerable, ViewProtocol, Resettable { //-------------------------------------------------- diff --git a/VDS/Components/Badge/Badge.swift b/VDS/Components/Badge/Badge.swift index 2f1feed6..d0550acf 100644 --- a/VDS/Components/Badge/Badge.swift +++ b/VDS/Components/Badge/Badge.swift @@ -15,6 +15,7 @@ public enum BadgeFillColor: String, Codable, CaseIterable { case red, yellow, green, orange, blue, black, white } +@objc(VDSBadge) public class Badge: View, Accessable { private var label = Label() diff --git a/VDS/Components/Button/Button.swift b/VDS/Components/Button/Button.swift index 8fb5ec7e..0d5ed7d5 100644 --- a/VDS/Components/Button/Button.swift +++ b/VDS/Components/Button/Button.swift @@ -16,6 +16,7 @@ public enum ButtonSize: String, Codable, CaseIterable { case small } +@objc(VDSButton) open class Button: UIButton, Handlerable, ViewProtocol, Resettable, Useable { //-------------------------------------------------- diff --git a/VDS/Components/Checkbox/Checkbox.swift b/VDS/Components/Checkbox/Checkbox.swift index e2355e10..303d7f81 100644 --- a/VDS/Components/Checkbox/Checkbox.swift +++ b/VDS/Components/Checkbox/Checkbox.swift @@ -11,8 +11,10 @@ import VDSColorTokens import VDSFormControlsTokens import Combine +@objc(VDSCheckbox) public class Checkbox: CheckboxBase{} +@objc(VDSSoloCheckbox) public class SoloCheckbox: CheckboxBase{ public override func initialSetup() { super.initialSetup() @@ -23,6 +25,7 @@ public class SoloCheckbox: CheckboxBase{ } } +@objc(VDSCheckboxBase) open class CheckboxBase: Control, Accessable, DataTrackable, BinaryColorable, Errorable { //-------------------------------------------------- // MARK: - Initializers diff --git a/VDS/Components/Checkbox/CheckboxGroup.swift b/VDS/Components/Checkbox/CheckboxGroup.swift index 105e916f..7501d11f 100644 --- a/VDS/Components/Checkbox/CheckboxGroup.swift +++ b/VDS/Components/Checkbox/CheckboxGroup.swift @@ -8,6 +8,7 @@ import Foundation import UIKit +@objc(VDSCheckboxGroup) public class CheckboxGroup: CheckboxGroupBase { public override func didSelect(_ selectedControl: Checkbox) { selectedControl.toggle() diff --git a/VDS/Components/Label/Label.swift b/VDS/Components/Label/Label.swift index be475664..67d4b837 100644 --- a/VDS/Components/Label/Label.swift +++ b/VDS/Components/Label/Label.swift @@ -10,8 +10,10 @@ import UIKit import VDSColorTokens import Combine +@objc(VDSLabel) public class Label: LabelBase {} +@objc(VDSLabelBase) open class LabelBase: UILabel, Handlerable, ViewProtocol, Resettable { //-------------------------------------------------- diff --git a/VDS/Components/RadioBox/RadioBox.swift b/VDS/Components/RadioBox/RadioBox.swift index b0c77f43..b5a3c252 100644 --- a/VDS/Components/RadioBox/RadioBox.swift +++ b/VDS/Components/RadioBox/RadioBox.swift @@ -11,9 +11,11 @@ import VDSColorTokens import VDSFormControlsTokens import Combine +@objc(VDSRadioBox) public class RadioBox: RadioBoxBase{} -public class SolorRadioBox: RadioBoxBase{ +@objc(VDSSoloRadioBox) +public class SoloRadioBox: RadioBoxBase{ public override func initialSetup() { super.initialSetup() @@ -24,6 +26,7 @@ public class SolorRadioBox: RadioBoxBase{ } } +@objc(VDSRadioBoxBase) open class RadioBoxBase: Control, BinaryColorable, Accessable, DataTrackable{ //-------------------------------------------------- // MARK: - Initializers diff --git a/VDS/Components/RadioBox/RadioBoxGroup.swift b/VDS/Components/RadioBox/RadioBoxGroup.swift index 057cd18a..f2c4022f 100644 --- a/VDS/Components/RadioBox/RadioBoxGroup.swift +++ b/VDS/Components/RadioBox/RadioBoxGroup.swift @@ -8,6 +8,7 @@ import Foundation import UIKit +@objc(VDSRadioBoxGroup) public class RadioBoxGroup: RadioBoxGroupBase { public override func didSelect(_ selectedControl: RadioBox) { diff --git a/VDS/Components/RadioButton/RadioButton.swift b/VDS/Components/RadioButton/RadioButton.swift index 9b406fb6..e46a4e8c 100644 --- a/VDS/Components/RadioButton/RadioButton.swift +++ b/VDS/Components/RadioButton/RadioButton.swift @@ -10,6 +10,7 @@ import UIKit import VDSColorTokens import VDSFormControlsTokens +@objc(VDSRadioButton) public class RadioButton: RadioButtonBase { //for groups allows "toggle" open override func toggle() { @@ -21,6 +22,7 @@ public class RadioButton: RadioButtonBase { } } +@objc(VDSSoloRadioButton) public class SoloRadioButton: RadioButtonBase { public override func initialSetup() { super.initialSetup() @@ -31,6 +33,7 @@ public class SoloRadioButton: RadioButtonBase { } } +@objc(VDSRadioButtonBase) open class RadioButtonBase: Control, Accessable, DataTrackable, BinaryColorable, Errorable { //-------------------------------------------------- // MARK: - Initializers diff --git a/VDS/Components/RadioButton/RadioButtonGroup.swift b/VDS/Components/RadioButton/RadioButtonGroup.swift index d3b103fa..1b357102 100644 --- a/VDS/Components/RadioButton/RadioButtonGroup.swift +++ b/VDS/Components/RadioButton/RadioButtonGroup.swift @@ -8,6 +8,7 @@ import Foundation import UIKit +@objc(VDSRadioButtonGroup) public class RadioButtonGroup: RadioButtonGroupBase { public override func didSelect(_ selectedControl: RadioButton) { diff --git a/VDS/Components/RadioSwatch/RadioSwatch.swift b/VDS/Components/RadioSwatch/RadioSwatch.swift index 003feceb..f548f18d 100644 --- a/VDS/Components/RadioSwatch/RadioSwatch.swift +++ b/VDS/Components/RadioSwatch/RadioSwatch.swift @@ -11,6 +11,7 @@ import VDSColorTokens import VDSFormControlsTokens import Combine +@objc(VDSRadioSwatch) public class RadioSwatch: RadioSwatchBase{ public override func initialSetup() { super.initialSetup() @@ -21,6 +22,7 @@ public class RadioSwatch: RadioSwatchBase{ } } +@objc(VDSRadioSwatchBase) open class RadioSwatchBase: Control, Accessable, DataTrackable, BinaryColorable { //-------------------------------------------------- diff --git a/VDS/Components/RadioSwatch/RadioSwatchGroup.swift b/VDS/Components/RadioSwatch/RadioSwatchGroup.swift index c3eca4a6..5132ba7a 100644 --- a/VDS/Components/RadioSwatch/RadioSwatchGroup.swift +++ b/VDS/Components/RadioSwatch/RadioSwatchGroup.swift @@ -9,6 +9,7 @@ import Foundation import UIKit import Combine +@objc(VDSRadioSwatchGroup) public class RadioSwatchGroup: RadioSwatchGroupBase { public override func didSelect(selector: RadioSwatch) { @@ -177,6 +178,7 @@ public class RadioSwatchGroupBase: SelectorGroupSe let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionViewCell", for: indexPath) let handler = selectorViews[indexPath.row] handler.isUserInteractionEnabled = false + cell.subviews.forEach { $0.removeFromSuperview() } cell.addSubview(handler) handler.topAnchor.constraint(equalTo: cell.topAnchor).isActive = true handler.leadingAnchor.constraint(equalTo: cell.leadingAnchor).isActive = true diff --git a/VDS/Components/Toggle/Toggle.swift b/VDS/Components/Toggle/Toggle.swift index 59f27f70..636f7545 100644 --- a/VDS/Components/Toggle/Toggle.swift +++ b/VDS/Components/Toggle/Toggle.swift @@ -30,6 +30,7 @@ public enum ToggleTextPosition: String, CaseIterable { Container: The background of the toggle control. Knob: The circular indicator that slides on the container. */ +@objc(VDSToggle) public class Toggle: ToggleBase{ public override func initialSetup() { super.initialSetup() @@ -40,6 +41,7 @@ public class Toggle: ToggleBase{ } } +@objc(VDSToggleBase) open class ToggleBase: Control, Accessable, DataTrackable, BinaryColorable { //--------------------------------------------------