I have a UIStackView that contains several labels. I called showSkeleton() on all the labels.
Each label shows up skeletonized.
Because SkeletonView sets the text of each label to nil, UIStackView sets the height of each label to 0 and lays them out on top of each other.
SkeletonView version:
1.0.4
Xcode version:
9.2
Swift version:
4
Hi @robinkunde, sorry for the delay in the answer. I've checked this behaviour and you're right, it's a bug. So, I'm going to add this bug in the backlog and I'm going to try to fix as soon as possible.
I am also having this issue. Are there any updates?
@jmjordan my workaround for UITableViews is to have a skeleton cell prototype that doesn't use UIStackView and show that instead.
One workaround is to wrap your labels in a UIView. It's subpar (I'm seeing https://github.com/Juanpe/SkeletonView/issues/64 with this approach), but it gets you most of the way there.
I've worked around this issue by not setting the text to nil but setting it to " " instead.
PrepareForSkeletonProtocol.swift:17
text = " "
Submitted a pull request to fix this.
https://github.com/Juanpe/SkeletonView/pull/73
Could you check if this bug is solved?
Thanks!
Sorry, I'm not using SkeletonView at the moment, but I looked at the diff at that should take care of it. You can close the issue if that works for you.