defect fixes
This commit is contained in:
parent
8d6e448817
commit
fe15372437
@ -49,7 +49,9 @@ open class CaretButton: MFCustomButton, MVMCoreUIMoleculeViewProtocol, MVMCoreUI
|
||||
didSet { changeCaretColor() }
|
||||
}
|
||||
|
||||
public func updateView(_ size: CGFloat) { }
|
||||
public func updateView(_ size: CGFloat) {
|
||||
titleLabel?.font = MFStyler.fontB1()
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// MARK: - Methods
|
||||
@ -61,10 +63,18 @@ open class CaretButton: MFCustomButton, MVMCoreUIMoleculeViewProtocol, MVMCoreUI
|
||||
setTitleColor(disabledColor, for: .disabled)
|
||||
|
||||
if let rightCaretView = rightView as? CaretView {
|
||||
rightCaretView.enabledColor = enabledColor
|
||||
rightCaretView.disabledColor = disabledColor
|
||||
rightCaretView.isEnabled = isEnabled
|
||||
}
|
||||
}
|
||||
|
||||
private func createCaretView() -> CaretView {
|
||||
let caret = CaretView()
|
||||
caret.lineWidth = 1.5
|
||||
return caret
|
||||
}
|
||||
|
||||
private func addCaretImageView() {
|
||||
|
||||
rightView?.removeFromSuperview()
|
||||
@ -75,7 +85,7 @@ open class CaretButton: MFCustomButton, MVMCoreUIMoleculeViewProtocol, MVMCoreUI
|
||||
let edgeInsets: UIEdgeInsets = contentEdgeInsets
|
||||
contentEdgeInsets = UIEdgeInsets(top: edgeInsets.top, left: edgeInsets.left, bottom: edgeInsets.bottom, right: 4 + width)
|
||||
|
||||
let caretView: UIView = rightView ?? CaretView()
|
||||
let caretView: UIView = rightView ?? createCaretView()
|
||||
rightView = caretView
|
||||
rightView?.translatesAutoresizingMaskIntoConstraints = false
|
||||
addSubview(caretView)
|
||||
|
||||
@ -31,7 +31,7 @@ import UIKit
|
||||
view.translatesAutoresizingMaskIntoConstraints = false
|
||||
addSubview(view)
|
||||
view.backgroundColor = progressObject.progressColor.uiColor
|
||||
view.widthAnchor.constraint(equalTo: widthAnchor, multiplier: progressObject.progress).isActive = true
|
||||
view.widthAnchor.constraint(equalTo: widthAnchor, multiplier: progressObject.progress/100.0).isActive = true
|
||||
view.leadingAnchor.constraint(equalTo: previous?.trailingAnchor ?? leadingAnchor).isActive = true
|
||||
previous = view
|
||||
NSLayoutConstraint.constraintPinSubview(view, pinTop: true, pinBottom: true, pinLeft: false, pinRight: false)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user