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

Pager causes app crash in iOS 16.4 due to a division by zero in PagerSettings.recalculateTransition() #125

Open
mcaciule opened this issue Mar 22, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@mcaciule
Copy link

Describe the bug
When using pagerTabStripViewStyle on iOS 16.4, PagerTabStripView crashes every time when shown. The issue is caused by line 130 from PagerSettings:
let indexAndPercentage = -contentOffset / width
This happens only on iOS 16.4, where initially the width used here is 0. As a workaround, setting the minWidth for PagerTabStripView to a non-zero real number (e.g: 1) fixes the the issue.

Versions (please complete the following information):

  • Xcode: Xcode 14.3 RC
  • Device: any
  • OS: 16.4 (currently beta)
@aehlke
Copy link

aehlke commented Apr 6, 2023

I also reproduce on iPhone 14 sim

@stephenfung98
Copy link

Reproduced on iPhone 14 pro, iOS 16.2

@cecipirotto cecipirotto added the bug Something isn't working label Aug 7, 2023
@f1xmAn
Copy link

f1xmAn commented Nov 22, 2023

It happens when PagerTabStripView is empty, e.g., no tabs are inside.

@mergesort
Copy link

I'm also able to recreate this, but there are no scenarios where I don't have any tabs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants