trying to deal with rendering issues
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
359a729379
commit
d336b8dfda
@ -30,7 +30,9 @@ public protocol SelectorControlable: Control, Changeable {
|
|||||||
/// Base Class used to build out a Selector control.
|
/// Base Class used to build out a Selector control.
|
||||||
@objcMembers
|
@objcMembers
|
||||||
@objc(VDSSelectorBase)
|
@objc(VDSSelectorBase)
|
||||||
open class SelectorBase: Control, SelectorControlable {
|
open class SelectorBase: Control, SelectorControlable, ParentViewProtocol {
|
||||||
|
public var children: [any ViewProtocol] { [selectorView] }
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -39,7 +39,8 @@ extension SelectorGroupSingleSelect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Base Class used for any Grouped Form Control of a Selector Type.
|
/// Base Class used for any Grouped Form Control of a Selector Type.
|
||||||
open class SelectorGroupBase<SelectorItemType: Groupable>: Control, SelectorGroup, Changeable {
|
open class SelectorGroupBase<SelectorItemType: Groupable>: Control, SelectorGroup, Changeable, ParentViewProtocol {
|
||||||
|
public var children: [any ViewProtocol] { items }
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Private Properties
|
// MARK: - Private Properties
|
||||||
|
|||||||
@ -11,7 +11,8 @@ import Combine
|
|||||||
import VDSCoreTokens
|
import VDSCoreTokens
|
||||||
|
|
||||||
/// Base Class used to build out a SelectorControlable control.
|
/// Base Class used to build out a SelectorControlable control.
|
||||||
open class SelectorItemBase<Selector: SelectorBase>: Control, Errorable, Changeable, Groupable {
|
open class SelectorItemBase<Selector: SelectorBase>: Control, Errorable, Changeable, Groupable, ParentViewProtocol {
|
||||||
|
public var children: [any ViewProtocol] { [label, childLabel, errorLabel, selectorView] }
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
|
|||||||
@ -14,7 +14,8 @@ import VDSCoreTokens
|
|||||||
/// that are used within a ``RadioBoxGroup``.
|
/// that are used within a ``RadioBoxGroup``.
|
||||||
@objcMembers
|
@objcMembers
|
||||||
@objc(VDSRadioBoxItem)
|
@objc(VDSRadioBoxItem)
|
||||||
open class RadioBoxItem: Control, Changeable, FormFieldable, Groupable {
|
open class RadioBoxItem: Control, Changeable, FormFieldable, Groupable, ParentViewProtocol {
|
||||||
|
public var children: [any ViewProtocol] { [textLabel, subTextLabel, subTextRightLabel, selectorView] }
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
|
|||||||
@ -9,6 +9,10 @@ import Foundation
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Combine
|
import Combine
|
||||||
|
|
||||||
|
public protocol ParentViewProtocol {
|
||||||
|
var children: [any ViewProtocol] { get }
|
||||||
|
}
|
||||||
|
|
||||||
public protocol ViewProtocol: AnyObject, Initable, Resettable, Enabling, Surfaceable, AccessibilityUpdatable {
|
public protocol ViewProtocol: AnyObject, Initable, Resettable, Enabling, Surfaceable, AccessibilityUpdatable {
|
||||||
/// Set of Subscribers for any Publishers for this Control.
|
/// Set of Subscribers for any Publishers for this Control.
|
||||||
var subscribers: Set<AnyCancellable> { get set }
|
var subscribers: Set<AnyCancellable> { get set }
|
||||||
@ -38,8 +42,15 @@ extension ViewProtocol {
|
|||||||
public func setNeedsUpdate() {
|
public func setNeedsUpdate() {
|
||||||
if shouldUpdateView {
|
if shouldUpdateView {
|
||||||
shouldUpdateView = false
|
shouldUpdateView = false
|
||||||
|
//let parent = self as? ParentViewProtocol
|
||||||
|
//parent?.children.forEach{ $0.shouldUpdateView = false }
|
||||||
updateView()
|
updateView()
|
||||||
updateAccessibility()
|
updateAccessibility()
|
||||||
|
// parent?.children.forEach{
|
||||||
|
// $0.updateView()
|
||||||
|
// $0.updateAccessibility()
|
||||||
|
// $0.shouldUpdateView = true
|
||||||
|
// }
|
||||||
shouldUpdateView = true
|
shouldUpdateView = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user