New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue displaying skeleton view on all table view cells #85
Comments
Hi @JordanPJamieson. Could you give more info about your code? |
Had the same issue happen, only fixed when implementing
|
Sorry for the late response, I fixed this issue by setting a default value instead of a dynamic value for the function: collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int { My API request wasn't retrieving the data in time to tell this method how many rows to display the skeleton view on before the function executed. Thanks for the suggestions. |
I'm having the same issues where the last cells aren't covered by skeleton view. I've set these params: tableView.rowHeight = UITableViewAutomaticDimension I also implemented this delegate function, which is being called. collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int { I'm having the issues on these devices: -Iphone XS Max Other devices look fine. Here is an image of what the issue looks like on screen:
|
^^ Just wanted to add that I changed my size class in Storyboard from iPhone XS to iPhone Max and skeleton view renders properly on all devices. It seems as if the height of my table view was being calculated off the values from storyboard? Dunno. |
I can confirm what @BryanRyczek said here. The last cell was showing without skeleton on iPhones XR and XS Max until I changed the size class in the storyboard. |
I am seeing the same issue. Thanks @BryanRyczek for a solution! This has been driving me nuts. |
Thanks for the responses 👏🏼 |
@Juanpe I wouldn't exactly call this resolved. It is a workaround, but it doesn't solve the issue. The size shouldn't depend on the storyboard values in the first place. If Apple makes a phone with an even taller screen all of the apps will break until somebody updates all of the storyboards again. |
I agree with @r00li. The number of skeletoned cells should be calculated by tableview height at runtime, which doesn't seem to be the case. Also I want to add that if your app is meant for iPad as well as iPhone, you will see this issue on iPad if your size class is set for iPhone. Unfortunately this issue led me to uninstall this pod and go with a blank background with a spinner. |
Hello @Juanpe |
I thought the |
Running into a similar error here. I'm using an iPhone XR simulator and a iPhone XR device. When I set my storyboard to the Xs Max, the skeleton view covers 100% of the original view. When I use the iPhone 8 size class, it only covers 80% of the view at runtime. |
anyone had a fix on this yet? |
Actually, if you don't specify the number of rows, SkeletonView calculates how many rows should be shown based on table view height. The problem is if you are showing the skeletons when the view will appear, the views are not ready yet, so the skeleton doesn't work correctly. But if you show the skeleton when the view did appear, the problem should be solved. Another possible solution is calling the method |
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. |
Has this been fixed yet? |
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. |
🙏🏼 Please check if it already exists other issue related with yours.
What did you do?
Added skeleton view to my table view, implemented all of the required methods, and set the estimatedRowHeight as suggested by others.
What did you expect to happen?
I pass in a number for the numberOfRowsInSection method and it will display the skeleton view on that specified number of rows.
What happened instead?
Only the first three table view cells get covered by the skeleton view and the rest of the cells are just blank templates of the table view cell I created in the storyboard. Maybe the height of my table needs to be changed because it's using the estimated number of rows instead?
Steps to reproduce the behaviour
Create a table view and assign the number of rows in section and not every cell gets covered with a skeleton view.
SkeletonView Environment
SkeletonView version:
Latest
Xcode version:
9.4
Swift version:
4
The text was updated successfully, but these errors were encountered: