Crashes : CALayer Position contains nan & iPhone X,XS Layout Issue
sambing opened this issue · 2 comments
Issue: 1)
I am running into a crash when loading the cells dynamically, upon scroll crashes with:
Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan -inf]'
Happens on all simulators and also in test devices.
I checked for existing issues and found nothing relating to it.
This happens with other images and the images shipped in the example project, if loaded dynamically.
For anybody having this issue:
Solution: Knowing that It was related to the cell size being laid out I assumed that it needed a placeholder image to set it up, and that fixes it, while the thumbnail gets fetched the placeholder should be first added.
I have not checked whether it would be an issue if the image loaded was a different size from the placeholder image however.
Issue 2)
On the iPhone X,XS,XS Max when scrolling the cells leave space at the bottom revealing the background. ( This happens with the images found on the example project )
Expected Behavior: Fill the whole cell as in the example project when ran on the iPhone 8,7 (4.7 inch displays)
For this I haven't looked much, maybe someone with more knowledge on the project can jump in?
Swift: 4.0
Xcode: 10
@sambing please split it into to issues. Could you also upload a demo project with the crash ?
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like this issue to remain open:
- Verify that you can still reproduce the issue in the latest version
- Comment that the issue is still reproducible and include:
- What version of CollectionViewSlantedLayout you reproduced the issue on
- What steps you followed to reproduce the issue
Issues that are labeled as crash will not be automatically marked as stale.