applied UserInfoable to views/controls
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
d6071686a2
commit
dd311fc920
@ -10,7 +10,7 @@ import UIKit
|
||||
import Combine
|
||||
|
||||
@objc(VDSControl)
|
||||
open class Control: UIControl, Handlerable, ViewProtocol, Resettable {
|
||||
open class Control: UIControl, Handlerable, ViewProtocol, Resettable, UserInfoable {
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Combine Properties
|
||||
@ -23,6 +23,8 @@ open class Control: UIControl, Handlerable, ViewProtocol, Resettable {
|
||||
//--------------------------------------------------
|
||||
private var initialSetupPerformed = false
|
||||
|
||||
open var userInfo = [String: Primitive]()
|
||||
|
||||
open var surface: Surface = .light { didSet { didChange() } }
|
||||
|
||||
open var disabled: Bool = false { didSet { isEnabled = !disabled } }
|
||||
|
||||
@ -11,7 +11,7 @@ import Combine
|
||||
|
||||
|
||||
@objc(VDSView)
|
||||
open class View: UIView, Handlerable, ViewProtocol, Resettable {
|
||||
open class View: UIView, Handlerable, ViewProtocol, Resettable, UserInfoable {
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Combine Properties
|
||||
@ -24,6 +24,8 @@ open class View: UIView, Handlerable, ViewProtocol, Resettable {
|
||||
//--------------------------------------------------
|
||||
private var initialSetupPerformed = false
|
||||
|
||||
open var userInfo = [String: Primitive]()
|
||||
|
||||
open var surface: Surface = .light { didSet { didChange() }}
|
||||
|
||||
open var disabled: Bool = false { didSet { isEnabled = !disabled } }
|
||||
|
||||
@ -18,7 +18,7 @@ public protocol Buttonable: UIControl, Surfaceable, Disabling {
|
||||
}
|
||||
|
||||
@objc(VDSButtonBase)
|
||||
open class ButtonBase: UIButton, Buttonable, Handlerable, ViewProtocol, Resettable {
|
||||
open class ButtonBase: UIButton, Buttonable, Handlerable, ViewProtocol, Resettable, UserInfoable {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Configuration Properties
|
||||
//--------------------------------------------------
|
||||
@ -48,6 +48,8 @@ open class ButtonBase: UIButton, Buttonable, Handlerable, ViewProtocol, Resettab
|
||||
|
||||
open var disabled: Bool = false { didSet { isEnabled = !disabled } }
|
||||
|
||||
open var userInfo = [String: Primitive]()
|
||||
|
||||
var isHighlightAnimating = false
|
||||
open override var isHighlighted: Bool {
|
||||
didSet {
|
||||
|
||||
@ -11,7 +11,7 @@ import VDSColorTokens
|
||||
import Combine
|
||||
|
||||
@objc(VDSLabel)
|
||||
public class Label: UILabel, Handlerable, ViewProtocol, Resettable {
|
||||
public class Label: UILabel, Handlerable, ViewProtocol, Resettable, UserInfoable {
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Combine Properties
|
||||
@ -37,6 +37,8 @@ public class Label: UILabel, Handlerable, ViewProtocol, Resettable {
|
||||
|
||||
open var textPosition: TextPosition = .left { didSet { didChange() }}
|
||||
|
||||
open var userInfo = [String: Primitive]()
|
||||
|
||||
open override var isEnabled: Bool {
|
||||
get { !disabled }
|
||||
set {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user