update for TitleLockup for label compression/hugging
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
c45270d94c
commit
466dbb7c6a
@ -68,6 +68,7 @@ open class TitleLockup: View {
|
||||
/// Label used to render the eyebrow model.
|
||||
open var eyebrowLabel = Label().with {
|
||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||
$0.setContentHuggingPriority(.required, for: .vertical)
|
||||
}
|
||||
|
||||
/// Model used in rendering the eyebrow label.
|
||||
@ -77,6 +78,7 @@ open class TitleLockup: View {
|
||||
/// Label used to render the title model.
|
||||
open var titleLabel = Label().with {
|
||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||
$0.setContentHuggingPriority(.required, for: .vertical)
|
||||
$0.accessibilityTraits.insert([.header])
|
||||
}
|
||||
|
||||
@ -87,6 +89,7 @@ open class TitleLockup: View {
|
||||
/// Label used to render the subtitle model.
|
||||
open var subTitleLabel = Label().with {
|
||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||
$0.setContentHuggingPriority(.required, for: .vertical)
|
||||
}
|
||||
|
||||
/// Model used in rendering the subtitle label.
|
||||
@ -380,7 +383,7 @@ open class TitleLockup: View {
|
||||
}
|
||||
|
||||
//pin the last view to the bottom of this view
|
||||
previousView?.pinBottom(0, .defaultHigh)
|
||||
previousView?.pinBottom(0)
|
||||
|
||||
//debugging for borders
|
||||
eyebrowLabel.debugBorder(show: hasDebugBorder, color: .green)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user