Closed kerimovscreations closed 3 years ago
Hello @kerimovscreations :wave:
Are you setting lastLineFillPercent
as 50
for this label?
Please note that lastLineFillPercent
will also be applied to single line labels as well. Kindly refer to the table, in this section of README - https://github.com/Juanpe/SkeletonView#-texts
More info - https://github.com/Juanpe/SkeletonView/issues/430
BTW, the default fallback value for lastLineFillPercent
is, multilineLastLineFillPercent
from SkeletonViewAppearance
which is set as 70
. It could be affecting your label as well.
Hello @selanthiraiyan
I didn't set any value for the property lastLineFillPercent
. I agree it can be 70
(I measured objectively by my glance).
Thanks for the response, I guess it causes extra parameters for every single label to set the gradient width to fill the full space.
You can change the default appearance value from 70
to 100
by doing the following.
SkeletonAppearance.default.multilineLastLineFillPercent = 100
Of course, you can customise (override) this value for specific labels and textviews if needed, by changing the lastLineFillPercent
value of those individual views.
Thanks for the tips!
Thank @selanthiraiyan for the answers 👍🏼
Description
Skeleton fills 50% of the label's line if it is single line.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
SkeletonView Environment:
SkeletonView version: 1.25.1 Xcode version: 12.5.1 Swift version: 5
Steps to reproduce:
showAnimatedGradientSkeleton()
Expected result:
Skeleton view should fill the full-width of single line UILabel component
Actual result:
Skeleton view filled the half-width of single line UILabel component