More comments.
This commit is contained in:
parent
98997bfa80
commit
639330ad5b
@ -24,10 +24,16 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
/// Holds the on and off colors for the container.
|
||||||
public var containerTintColor: (on: UIColor?, off: UIColor?)? = (on: .mfShamrock(), off: .black)
|
public var containerTintColor: (on: UIColor?, off: UIColor?)? = (on: .mfShamrock(), off: .black)
|
||||||
|
|
||||||
|
/// Holds the on and off colors for the knob.
|
||||||
public var knobTintColor: (on: UIColor?, off: UIColor?)? = (on: .white, off: .white)
|
public var knobTintColor: (on: UIColor?, off: UIColor?)? = (on: .white, off: .white)
|
||||||
|
|
||||||
|
/// Holds the on and off colors for the disabled state..
|
||||||
public var disabledTintColor: (container: UIColor?, knob: UIColor?)? = (container: .mfSilver(), knob: .white)
|
public var disabledTintColor: (container: UIColor?, knob: UIColor?)? = (container: .mfSilver(), knob: .white)
|
||||||
|
|
||||||
|
/// Set this flag to false if you do not want to animate state changes.
|
||||||
public var isAnimated = true
|
public var isAnimated = true
|
||||||
|
|
||||||
public var didToggleAction: ActionBlock?
|
public var didToggleAction: ActionBlock?
|
||||||
@ -61,12 +67,14 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Simple means to prevent user interaction with the toggle.
|
||||||
public var isLocked: Bool = false {
|
public var isLocked: Bool = false {
|
||||||
didSet {
|
didSet {
|
||||||
isUserInteractionEnabled = !isLocked
|
isUserInteractionEnabled = !isLocked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The state on the toggle. Default value: false.
|
||||||
open var isOn: Bool = false {
|
open var isOn: Bool = false {
|
||||||
didSet {
|
didSet {
|
||||||
isSelected = isOn
|
isSelected = isOn
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user