fixed layout issues
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
d1a74ea387
commit
0f8ab50192
@ -27,7 +27,14 @@ open class Loader: View {
|
||||
open var isActive: Bool = true { didSet { setNeedsUpdate() } }
|
||||
|
||||
/// The Int used to determine the height and width of the Loader
|
||||
open var size: Int = 40 { didSet { setNeedsUpdate() } }
|
||||
open var size: Int = 40 {
|
||||
didSet {
|
||||
setNeedsUpdate();
|
||||
invalidateIntrinsicContentSize()
|
||||
}
|
||||
}
|
||||
|
||||
open override var intrinsicContentSize: CGSize { .init(width: size, height: size) }
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Lifecycle
|
||||
|
||||
@ -43,7 +43,7 @@ open class TitleLockup: View {
|
||||
private var stackView = UIStackView().with {
|
||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||
$0.axis = .vertical
|
||||
$0.distribution = .fill
|
||||
$0.distribution = .fillProportionally
|
||||
}
|
||||
|
||||
private var otherStandardStyle: OtherStandardStyle {
|
||||
@ -311,7 +311,6 @@ open class TitleLockup: View {
|
||||
eyebrowLabel.attributes = eyebrowModel.textAttributes
|
||||
eyebrowLabel.numberOfLines = eyebrowModel.numberOfLines
|
||||
eyebrowLabel.surface = surface
|
||||
|
||||
//When uniform size is true
|
||||
if let titleModel, isUniformSize {
|
||||
if titleModel.isBold {
|
||||
@ -329,6 +328,7 @@ open class TitleLockup: View {
|
||||
eyebrowLabel.textColorConfiguration = textColorPrimaryConfiguration
|
||||
eyebrowLabel.textStyle = eyebrowModel.isBold ? otherStandardStyle.value.bold : otherStandardStyle.value.regular
|
||||
}
|
||||
eyebrowLabel.sizeToFit()
|
||||
} else {
|
||||
eyebrowLabel.reset()
|
||||
}
|
||||
@ -341,6 +341,7 @@ open class TitleLockup: View {
|
||||
titleLabel.attributes = titleModel.textAttributes
|
||||
titleLabel.numberOfLines = titleModel.numberOfLines
|
||||
titleLabel.surface = surface
|
||||
titleLabel.sizeToFit()
|
||||
} else {
|
||||
titleLabel.reset()
|
||||
}
|
||||
@ -354,6 +355,7 @@ open class TitleLockup: View {
|
||||
subTitleLabel.attributes = subTitleModel.textAttributes
|
||||
subTitleLabel.numberOfLines = subTitleModel.numberOfLines
|
||||
subTitleLabel.surface = surface
|
||||
subTitleLabel.sizeToFit()
|
||||
} else {
|
||||
subTitleLabel.reset()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user