Skeletonview: Problem with position of mask

Created on 25 Nov 2017  路  11Comments  路  Source: Juanpe/SkeletonView

@Juanpe

What did you do?

Use your project in my app :)

What did you expect to happen?

This will work perfectly :)

What happened instead?

Something weird :)

Steps to reproduce the behavior

Don't worry, I changed your example, added my cell and this still not work. Without skeleton tableView look good, but with animated skeleton some of views in cell have problems.
Can you help me fix this ? :) My app has complicated logic and unfortunately I need this and others cells AS IS :/

SkeletonViewWithError.zip

SkeletonView Environment

SkeletonView version: 1.0.4
Xcode version: 9.1
Swift version: 4

given up 馃棏 given up 馃 possible bug

Most helpful comment

Hi @kszuba, I've checked your project and could be a problem with constraints? Actually, SkeletonView only take account constraints of width and height. Maybe in the future, I'll need to improve how to use the constraints to calculate the right frame.

All 11 comments

Hi @kszuba, I'm going to check :)
Thanks

Hi @Juanpe,
have you had time to check the error?

I also find it's not working well. I'm going to write my own since that would probably take as much time as debugging what's going on. Too bad, because the concept/code looks good.

Hi @kszuba, I've checked your project and could be a problem with constraints? Actually, SkeletonView only take account constraints of width and height. Maybe in the future, I'll need to improve how to use the constraints to calculate the right frame.

FYI, I'm doing it a different way. It might not be entirely economical, but for my use-case it works fine. I just hold an extra UIView in each UIView extension that resizes itself to its parent. This way, the skeleton will always be the size of the view that contains dummy data. This is nice if you change orientation and your label changes size (the skeleton will also change size).

I just want to give my input here just in case someone gets in my same situation. Using trailing / leading constrains was making problems with the Skeleton View. As @Juanpe mentioned using direct width + height was the only way to go around it. I tried to update constraints, setNeedsLayout, making a subclass of UILabel, nothing worked, so here is what happened after doing the direct width/height.
screen shot 2018-07-11 at 10 36 37 am
screen shot 2018-07-11 at 10 35 02 am

This lib does not work well for SnapKit. With setting direct height and width, the position of the skeletonView does not work properly.

me too

A year on, the problem has not been solved

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kimsonwong picture kimsonwong  路  6Comments

guidev picture guidev  路  4Comments

kak2008 picture kak2008  路  4Comments

barankaansert picture barankaansert  路  3Comments

macistador picture macistador  路  6Comments