Further improved label dynamic sizing.
This commit is contained in:
parent
353f8cd301
commit
9cfa00c533
@ -73,8 +73,9 @@ import Foundation
|
||||
if leftTextLabel.hasText && rightTextLabel.hasText {
|
||||
let padding = MFStyler.defaultHorizontalPadding(forSize: size) * 2
|
||||
let maximumTextWidth = (size - (padding + 16)) * 0.4
|
||||
rightTextLabel.preferredMaxLayoutWidth = round(maximumTextWidth)
|
||||
} else {
|
||||
// Subtracting 10 resolves issues of SE and iPad
|
||||
rightTextLabel.preferredMaxLayoutWidth = round(maximumTextWidth) - 10
|
||||
} else {
|
||||
rightTextLabel.preferredMaxLayoutWidth = 0
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user