Closed YuriFuze closed 2 years ago
Hi @YuriFuze 👋🏼
Sorry for the late response. I like the idea, so I'm going to include it in the backlog 👍🏼
Hi @YuriFuze, this change has been included in version 1.28.0.
You can check more details in the PR #479
Awesome!
Hi @Juanpe
I have tried using label.skeletonTextNumberOfLines = 1
but the compiler told me that Value of type 'UILabel' has no member 'skeletonTextNumberOfLines'
. Then I tried looking for UILabel+SKExtensions.swift
file on Podile/SkeletonView but found nothing. I am using v 1.13.0.
Ah sorry, I am using v 1.13.0 instead of 1.30.0 and the skeletonTextNumberOfLines
property is defined on v 1.28.0 thats why I didn't find it.
Describe the feature or problem you’d like to solve
When we have a label with dynamic heights and set its number of lines to 0 the view loses the ability to draw the lines simulating a text. Instead it works as a normal view skeleton and fills the entire label frame.
Proposed solution
You could add a variable to set a custom number of lines on SkeletonView instead of calculating it based on height or the actual numberOfLines of the UILabel. This way when we face the problem with dynamic heights and unlimited lines we have the intended effect of showing a text skeleton.