add missing number of lines
This commit is contained in:
parent
f09892b4c6
commit
8b3b4964b8
@ -24,7 +24,6 @@ import Foundation
|
|||||||
super.setupView()
|
super.setupView()
|
||||||
layer.borderColor = UIColor.mvmCoolGray6.cgColor
|
layer.borderColor = UIColor.mvmCoolGray6.cgColor
|
||||||
layer.borderWidth = 1
|
layer.borderWidth = 1
|
||||||
label.numberOfLines = 1
|
|
||||||
addSubview(label)
|
addSubview(label)
|
||||||
NSLayoutConstraint.constraintPinSubview(label, pinTop: true, topConstant: 13, pinBottom: true, bottomConstant: 13, pinLeft: true, leftConstant: 15, pinRight: true, rightConstant: 15)
|
NSLayoutConstraint.constraintPinSubview(label, pinTop: true, topConstant: 13, pinBottom: true, bottomConstant: 13, pinLeft: true, leftConstant: 15, pinRight: true, rightConstant: 15)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,12 @@ import Foundation
|
|||||||
case backgroundColor
|
case backgroundColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func setDefaults() {
|
||||||
|
if label.numberOfLines == nil {
|
||||||
|
label.numberOfLines = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
label = try typeContainer.decode(LabelModel.self, forKey: .label)
|
label = try typeContainer.decode(LabelModel.self, forKey: .label)
|
||||||
|
|||||||
@ -64,6 +64,7 @@ open class DoughnutChart: View {
|
|||||||
open override func reset() {
|
open override func reset() {
|
||||||
super.reset()
|
super.reset()
|
||||||
titleLabel.reset()
|
titleLabel.reset()
|
||||||
|
titleLabel.numberOfLines = 1
|
||||||
subTitleLabel.reset()
|
subTitleLabel.reset()
|
||||||
clearLayers()
|
clearLayers()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,9 @@ open class CollapsableNotificationModel: NotificationModel {
|
|||||||
|
|
||||||
open override func setDefaults() {
|
open override func setDefaults() {
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
|
if topLabel.numberOfLines == nil {
|
||||||
|
topLabel.numberOfLines = 1
|
||||||
|
}
|
||||||
if topLabel.textColor == nil {
|
if topLabel.textColor == nil {
|
||||||
topLabel.textColor = Color(uiColor: .white)
|
topLabel.textColor = Color(uiColor: .white)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import Foundation
|
|||||||
@objcMembers open class CollapsableNotificationTopView: View {
|
@objcMembers open class CollapsableNotificationTopView: View {
|
||||||
public let label: Label = {
|
public let label: Label = {
|
||||||
let label = Label(fontStyle: .BoldBodySmall)
|
let label = Label(fontStyle: .BoldBodySmall)
|
||||||
label.numberOfLines = 1
|
|
||||||
label.textAlignment = .center
|
label.textAlignment = .center
|
||||||
label.setContentHuggingPriority(.defaultHigh, for: .vertical)
|
label.setContentHuggingPriority(.defaultHigh, for: .vertical)
|
||||||
return label
|
return label
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user