Giter Club home page Giter Club logo

Comments (12)

VladIacobIonut avatar VladIacobIonut commented on June 11, 2024 1

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.

JoniVR avatar JoniVR commented on June 11, 2024 1

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.

VladIacobIonut avatar VladIacobIonut commented on June 11, 2024

I opened a PR (#14) for that as well so you can see the implementation

from verticalcardswiper.

JoniVR avatar JoniVR commented on June 11, 2024

Hi @VladIacobIonut

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.

JoniVR avatar JoniVR commented on June 11, 2024

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.

JoniVR avatar JoniVR commented on June 11, 2024

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:

info 3 cells - index 4

info 4 cells - index 5

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.

VladIacobIonut avatar VladIacobIonut commented on June 11, 2024

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.

JoniVR avatar JoniVR commented on June 11, 2024

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.

JoniVR avatar JoniVR commented on June 11, 2024

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.

VladIacobIonut avatar VladIacobIonut commented on June 11, 2024

Good !! I'll keep an eye on it myself

from verticalcardswiper.

JoniVR avatar JoniVR commented on June 11, 2024

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.

VladIacobIonut avatar VladIacobIonut commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.