Comments (12)
Indeed, didn't notice however this always happens on indexes 5 and 9 but it's true. Please let me know if you fix it. I will also be looking for a fix in the meanwhile.
Thank you,
Vlad.
from verticalcardswiper.
I submitted a fix for the final glitch and everything seems to be working now, I'll merge this into a separate branch and then into development. After that I'll push development to master when I release the next version (which should be pretty soon).
edit:
Almost forgot! thanks for contributing by the way 🙂 I mentioned you in the Changelog.
from verticalcardswiper.
I opened a PR (#14) for that as well so you can see the implementation
from verticalcardswiper.
First of all, thanks for contributing.
I haven't properly looked into adding the effect before because I was trying to get things as stable as possible, but it's really great that you've already started looking into it.
It could indeed be something you describe, as I've seen some indexPath and zPosition issues before.
I'm currently a bit limited in free time, but I'll try to look at it in the next few hours. Thanks again!
Kind regards
Joni
from verticalcardswiper.
You are correct, for some reason this only seems to be happening on index 5 and 9 on the example code. I'll try to figure out what's happening but I'm currently not sure.
from verticalcardswiper.
I did some more debugging and figured out the following things (nothing special really, just some extra info on the bug):
- The issue already existed before your implementation of the stack effect.
- It is indeed a cell reuse issue (on certain indexes 5,9 for example it will have 4 instead of 3 "visible cells")
I thought I might be because some layout differences because of the cell scaling or something (some cells being a little bit smaller causing the system to adjust the amount of visible cells), but after comparing in the debugger, the cell sizes seem to be the same on both, here's the comparison:
So that doesn't seem to be the issue at first sight. Will look further into this whenever I get some time but I'm extremely time constrained right now so it'll probably take some time for me to figure it out.
from verticalcardswiper.
Sure. I am even considering the case in which Shazam uses two static views behind the CollectionView to simulate the stack effect. But I really hope I'm wrong.
Thank you anyways for looking into this !
from verticalcardswiper.
They could possibly just be using UIViews too, I've seen it before, but the reason I picked UICollectionview
as a base layer to start from was the cell reuse so.. hope I'm not going to regret that decision lol
from verticalcardswiper.
Opened a Stackoverflow question on this:
https://stackoverflow.com/questions/52739405/uicollectionview-custom-layout-some-indexes-have-more-visible-cells-than-others
I'll edit this comment whenever I find new observations and post them below.
Here are some observations:
- The issue already existed before your implementation of the stack effect.
- It is indeed a cell reuse issue (on certain indexes 5,9 for example it will have 4 instead of 3 "visible cells").
- It happens every 4-5 cards where it shows a stack of 3 cards instead of 2.
from verticalcardswiper.
Good !! I'll keep an eye on it myself
from verticalcardswiper.
I submitted the fix someone suggested on stackoverflow, as far as I can tell there still a little issue where the card position isn't 100% right after starting a swipe to either side and then aborting, but this should be fairly easy to fix.
from verticalcardswiper.
Hi again,
I'm happy to hear this got fixed somehow! as I hope I'll use this one day in a real app. I watched the thread on Stackoverflow as well but didn't notice a new answer was posted until this morning when you replied here. I only noticed that guy who implied the problem might come from the collectionviewlayout which decides to show only two cards. Fairly this was my intuition as well, but I didn't dare to modify it and simply extend UICollectionViewLayout 😅.
Thank you for helping 👍
from verticalcardswiper.
Related Issues (20)
- [Feature] Swipe without removing the item from the list HOT 4
- [Feature] Lower the opacity for the stacked cards HOT 3
- Expose `cellForItem` API HOT 4
- Stop Left Swipe || Increase Card Size HOT 1
- [Bug] Adding multiple card sizes doesn't snap card correctly HOT 3
- [Bug] Losing cards from stack when device orientation is rotated HOT 7
- [Question] How do I use a button on this card to launch a new ViewController> HOT 1
- How to preview card(cell) reload?[Question] HOT 2
- [Bug] `isStackOnBottom` and `stackedCardsCount` not working on 2.3.0 HOT 5
- How can I change the size of card view? HOT 1
- [Bug] Toolbar won't respond
- How do you disable vertical scrolling?
- [Question] I want to modify the alpha value according to the scroll ratio when scrolling cell
- [Question] I have a problem when scrolling, the view behind it overlaps.
- [Question] Current and Next cell with different size.
- MJRefresh failed to refresh. HOT 1
- How to scrollToCard horizontally?
- Removing the velocity animation
- utility function
- SwiftUI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from verticalcardswiper.