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.5k stars 1.1k forks source link

UILabels not respecting constraints #524

Open hiagochagas opened 1 year ago

hiagochagas commented 1 year 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 1 year 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 1 year 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๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰