ensure any buttonBase in ButtonGroup is 1 line only
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
57db5768ef
commit
94a505d20e
@ -149,7 +149,15 @@ open class ButtonGroup: View {
|
||||
case .percentage(let value): percentage = value
|
||||
}
|
||||
}
|
||||
buttons.forEach { if let width { ($0 as? Button)?.width = .value(width) } }
|
||||
buttons.forEach { buttonBase in
|
||||
//only allow 1 line for any button
|
||||
buttonBase.titleLabel?.numberOfLines = 1
|
||||
buttonBase.titleLabel?.lineBreakMode = .byTruncatingTail
|
||||
|
||||
if let width {
|
||||
(buttonBase as? Button)?.width = .value(width)
|
||||
}
|
||||
}
|
||||
positionLayout.buttonPercentage = percentage
|
||||
|
||||
collectionView.reloadData()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user