Changes as per review comments
This commit is contained in:
parent
bba4cbfb66
commit
921df032b2
@ -316,8 +316,8 @@ public typealias ActionBlock = () -> ()
|
||||
textColor = color.uiColor
|
||||
}
|
||||
|
||||
if let numberofLines = labelModel.numberOfLines {
|
||||
numberOfLines = numberofLines
|
||||
if let lines = labelModel.numberOfLines {
|
||||
numberOfLines = lines
|
||||
}
|
||||
|
||||
if let attributes = labelModel.attributes, let labelText = text {
|
||||
@ -794,6 +794,7 @@ extension Label {
|
||||
accessibilityCustomActions = []
|
||||
clauses = []
|
||||
accessibilityTraits = .staticText
|
||||
numberOfLines = 0
|
||||
}
|
||||
|
||||
public func needsToBeConstrained() -> Bool { true }
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
public var html: String?
|
||||
public var hero: Int?
|
||||
public var makeWholeViewClickable: Bool?
|
||||
public var numberOfLines:Int?
|
||||
public var numberOfLines: Int?
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
@ -51,24 +51,13 @@
|
||||
enum AttributeTypeKey: String, CodingKey {
|
||||
case type
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Methods
|
||||
//-----------------------------------------------------
|
||||
|
||||
internal func setDefaults() {
|
||||
if numberOfLines == nil {
|
||||
numberOfLines = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Initializer
|
||||
//--------------------------------------------------
|
||||
|
||||
public init(text: String) {
|
||||
self.text = text
|
||||
setDefaults()
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -55,7 +55,6 @@
|
||||
leftImage.contentMode = .scaleAspectFit
|
||||
rightLabel.setContentCompressionResistancePriority(UILayoutPriority(rawValue: 900), for: .horizontal)
|
||||
rightLabel.setContentHuggingPriority(UILayoutPriority(rawValue: 900), for: .horizontal)
|
||||
rightLabel.numberOfLines = 1
|
||||
addMolecule(stack)
|
||||
stack.restack()
|
||||
}
|
||||
@ -73,9 +72,6 @@
|
||||
headlineBody.set(with: model.headlineBody, delegateObject, additionalData)
|
||||
rightLabel.set(with: model.rightLabel, delegateObject, additionalData)
|
||||
updateAccessibilityLabel()
|
||||
if let numberOfLines = model.rightLabel.numberOfLines{
|
||||
rightLabel.numberOfLines = numberOfLines
|
||||
}
|
||||
}
|
||||
|
||||
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
|
||||
@ -29,6 +29,9 @@ public class ListLeftVariableIconWithRightCaretBodyTextModel: ListItemModel, Mol
|
||||
}
|
||||
headlineBody.style = .item
|
||||
headlineBody.headline?.hero = 0
|
||||
if rightLabel.numberOfLines == nil {
|
||||
rightLabel.numberOfLines = 1
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user