SkeletonView icon indicating copy to clipboard operation
SkeletonView copied to clipboard

Custom skeleton width for a label

Open fedorpashin opened this issue 4 years ago • 2 comments

I found out that I can set the custom skeleton width for a label by changing intrinsic size in the Size inspector. However, it is not working with recursive skeleton activation. It would be great if it worked this way too.

fedorpashin avatar Feb 09 '20 20:02 fedorpashin

Hi @fedorpashin, please, could you use the issue template to open an issue? The idea of this template is to provide all the info needed to try to solve this problem. Taking the info provided by you, I don't exactly what are you need to do; I mean, you want to set a custom width, but the skeleton takes into account the layout constraints.

Juanpe avatar Feb 09 '20 22:02 Juanpe

Yes, no problem.

What did you do?

Set intrinsic size for my labels in the Size inspector and activated skeletons recursively.

What did you expect to happen?

Custom skeleton width for my labels.

What happened instead?

The width remained equal to the width of the text.

Steps to reproduce the behavior

  • Create skeletonable UILabel
  • Set intrinsic size width of the label to the value greater than the text width
  • Activate the skeleton directly for this label and run – the skeleton width changes (expected behaviour)
  • Activate the skeleton recursively and run – the skeleton width remains equal to the text width (unexpected behaviour)

SkeletonView Environment

SkeletonView version: 1.8.2 Xcode version: 11.3.1 Swift version: 5.1

fedorpashin avatar Feb 10 '20 07:02 fedorpashin