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