resolvong a constraint issue
This commit is contained in:
parent
82c7b372c9
commit
d8d691f2cc
@ -135,12 +135,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
knobLeadingConstraint?.isActive = false
|
knobLeadingConstraint?.isActive = false
|
||||||
knobTrailingConstraint?.isActive = false
|
knobTrailingConstraint?.isActive = false
|
||||||
|
|
||||||
if isOn {
|
_ = isOn ? constrainKnobOn() : constrainKnobOff()
|
||||||
constrainKnobOn()
|
|
||||||
|
|
||||||
} else {
|
|
||||||
constrainKnobOff()
|
|
||||||
}
|
|
||||||
|
|
||||||
knobTrailingConstraint?.isActive = true
|
knobTrailingConstraint?.isActive = true
|
||||||
knobLeadingConstraint?.isActive = true
|
knobLeadingConstraint?.isActive = true
|
||||||
@ -242,7 +237,6 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
bottomAnchor.constraint(greaterThanOrEqualTo: knobView.bottomAnchor).isActive = true
|
bottomAnchor.constraint(greaterThanOrEqualTo: knobView.bottomAnchor).isActive = true
|
||||||
|
|
||||||
constrainKnobOff()
|
constrainKnobOff()
|
||||||
knobLeadingConstraint?.isActive = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func reset() {
|
public override func reset() {
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|
||||||
@objcMembers open class LabelToggle: View {
|
@objcMembers open class LabelToggle: View {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
@ -38,7 +39,9 @@ import UIKit
|
|||||||
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||||
guard let model = model as? LabelToggleModel,
|
guard let model = model as? LabelToggleModel,
|
||||||
let toggleHeight = Toggle.estimatedHeight(with: model.toggle, delegateObject),
|
let toggleHeight = Toggle.estimatedHeight(with: model.toggle, delegateObject),
|
||||||
let labelHeight = Label.estimatedHeight(with: model.label, delegateObject) else { return nil }
|
let labelHeight = Label.estimatedHeight(with: model.label, delegateObject)
|
||||||
|
else { return nil }
|
||||||
|
|
||||||
return max(toggleHeight, labelHeight)
|
return max(toggleHeight, labelHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user