The goal of this PR is to improve how the number of lines for text nodes is calculated. Until now, the library decided to use the value of the numberOfLines property. Now, exist a new type to define how the library should calculate the number.
Before
You could set the number of lines by setting the numberOfLines property:
label.numberOfLines = 2
/// Both the label and the skeleton have 2 lines
After
Now, you can be more specific:
label.numberOfLines = 2
label.skeletonTextNumberOfLines = 1
/// The label has 2 lines but the skeleton has only one.
Here the SkeletonTextNumberOfLines definition:
enum SkeletonTextNumberOfLines {
/// Returns `numberOfLines` value.
case inherited
/// Returns the specific number of lines specified as the associated value.
case custom(Int)
}
Summary
The goal of this PR is to improve how the number of lines for text nodes is calculated. Until now, the library decided to use the value of the
numberOfLines
property. Now, exist a new type to define how the library should calculate the number.Before
You could set the number of lines by setting the
numberOfLines
property:After
Now, you can be more specific:
Here the
SkeletonTextNumberOfLines
definition: