Juanpe / SkeletonView

โ˜ ๏ธ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
MIT License
12.62k stars 1.12k forks source link

UILabels not respecting constraints #524

Open hiagochagas opened 2 years ago

hiagochagas commented 2 years ago

Hello, I'm fetching data from API, and while it's happening, the skeleton looks like this:

Simulator Screen Shot - iPhone 13 - 2022-10-20 at 17 13 25

When it should look like this: Simulator Screen Shot - iPhone 13 - 2022-10-20 at 17 12 41

The second image happens because I'm not stopping skeleton animation when the data from API is received.

Any tips on what might be wrong?

zkfpk6 commented 2 years ago

same here, i don't know why, must call [self layoutIfNeeded] before showSkeleton, and i'm already set the label's default text..sorry for my english

zkfpk6 commented 2 years ago

omg i think i have find the answer, set 'view.isSkeletonable = true' both view and view's container view, and call 'container.showAnimatedGradientSkeleton' can fix this๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰