Skip to content
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

[Bug] Losing cards from stack when device orientation is rotated #74

Open
4 tasks done
Proudspark opened this issue Sep 14, 2020 · 7 comments
Open
4 tasks done
Labels

Comments

@Proudspark
Copy link

Proudspark commented Sep 14, 2020

New Issue Checklist

Bug Description

Changing device orientation to landscape removes some cards from view

To Reproduce

Steps to reproduce the behavior:

  1. Create more than one card for testing (eg 8), using normal methods.
  2. Use numbers in sequential labelling visible on cards
  3. Allow view to rotate to landscape orientation
  4. Notice that only even numbered labels are visible

Expected behavior

Not expecting views to resize to landscape view (another issue, another day), but expecting to see all available cards in stack. Looking at card No 1 reverts to card No 2 when rotated to landscape. Looking at card No 3 reverts to No 6 when rotated.

Environment

  • iOS Version: [13.7]
  • Device(s): [iPhone X]
  • Xcode Version: [11.7]
@JoniVR
Copy link
Owner

JoniVR commented Sep 14, 2020

Notice that only even numbered labels are visible

I'm not sure I fully understand you here, do you mean some cards are actually missing or are they just scrolled away?

From my testing on the example project I can indeed see that when you rotate to landscape the focussedItem is "lost" and the offset is incorrect, is that what you mean?

@JoniVR JoniVR added the bug label Sep 14, 2020
@Proudspark
Copy link
Author

Here is a video which may help to explain issue a little better 8•)

https://vimeo.com/458047406

@JoniVR
Copy link
Owner

JoniVR commented Sep 15, 2020

I'm not sure if that's a bug with the library, when I modify the Example project to show the index instead of the age in the demo cards this does not happen as far as I can tell.

It does however end up on a different index which might be the underlying issue, are you doing anything special with your indexes?

Here's a modified example project which doesn't do this (I just replaced the age with index and added landscape support):
VerticalCardSwiper.zip

@JoniVR
Copy link
Owner

JoniVR commented Oct 4, 2020

Any update on this?

@alamodey
Copy link

Here is a video which may help to explain issue a little better 8•)

https://vimeo.com/458047406

How do you maintain your cards centered even rotated to landscape? My stack moves into a corner.

@Proudspark
Copy link
Author

@JoniVR - hi there, I saw it working as expected in the modified example you gave. So still need to figure this one out...

@alamodey - this centering is done with setting constraints on storyboard 👍

@alamodey
Copy link

@JoniVR - hi there, I saw it working as expected in the modified example you gave. So still need to figure this one out...

@alamodey - this centering is done with setting constraints on storyboard 👍

Do you mind elaborating what setting you are applying, as my view already takes up the whole screen but it's just the cards that are off-center.

Screen Shot 2021-01-26 at 10 07 58 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants