Skip to content

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

@mcaciule

Description

@mcaciule

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions