left aligned content for scenarios to where the container is stretched.
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
d76da5d216
commit
3c8176062c
@ -87,6 +87,10 @@ open class TextLink: ButtonBase {
|
||||
isAccessibilityElement = true
|
||||
accessibilityTraits = .link
|
||||
|
||||
//left align titleLabel in case this is pinned leading/trailing
|
||||
//default is always set to center
|
||||
contentHorizontalAlignment = .left
|
||||
|
||||
if let titleLabel {
|
||||
addSubview(line)
|
||||
line.pinLeading(titleLabel.leadingAnchor)
|
||||
|
||||
@ -79,6 +79,11 @@ open class TextLinkCaret: ButtonBase {
|
||||
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||
open override func setup() {
|
||||
super.setup()
|
||||
|
||||
//left align titleLabel in case this is pinned leading/trailing
|
||||
//default is always set to center
|
||||
contentHorizontalAlignment = .left
|
||||
|
||||
accessibilityTraits = .link
|
||||
titleLabel?.numberOfLines = 0
|
||||
titleLabel?.lineBreakMode = .byWordWrapping
|
||||
|
||||
Loading…
Reference in New Issue
Block a user