updated trait

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-09-21 14:55:14 -05:00
parent 886577e945
commit 4f68f67a6b

View File

@ -47,7 +47,7 @@ open class Badge: View {
//--------------------------------------------------
/// Label used to render text
open var label = Label().with {
$0.isAccessibilityElement = false
$0.isAccessibilityElement = false
$0.lineBreakMode = .byTruncatingTail
$0.setContentCompressionResistancePriority(.required, for: .vertical)
$0.setContentHuggingPriority(.defaultHigh, for: .vertical)
@ -133,6 +133,8 @@ open class Badge: View {
open override func setup() {
super.setup()
isAccessibilityElement = true
accessibilityTraits = .staticText
layer.cornerRadius = 2
addSubview(label)