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
6290a43004
commit
2e0d0be8b6
@ -87,6 +87,10 @@ open class TextLink: ButtonBase {
|
|||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .link
|
accessibilityTraits = .link
|
||||||
|
|
||||||
|
//left align titleLabel in case this is pinned leading/trailing
|
||||||
|
//default is always set to center
|
||||||
|
contentHorizontalAlignment = .left
|
||||||
|
|
||||||
if let titleLabel {
|
if let titleLabel {
|
||||||
addSubview(line)
|
addSubview(line)
|
||||||
line.pinLeading(titleLabel.leadingAnchor)
|
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.
|
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||||
open override func setup() {
|
open override func setup() {
|
||||||
super.setup()
|
super.setup()
|
||||||
|
|
||||||
|
//left align titleLabel in case this is pinned leading/trailing
|
||||||
|
//default is always set to center
|
||||||
|
contentHorizontalAlignment = .left
|
||||||
|
|
||||||
accessibilityTraits = .link
|
accessibilityTraits = .link
|
||||||
titleLabel?.numberOfLines = 0
|
titleLabel?.numberOfLines = 0
|
||||||
titleLabel?.lineBreakMode = .byWordWrapping
|
titleLabel?.lineBreakMode = .byWordWrapping
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user