Skip to content

[BUG] Pager scrolls in the opposite direction in RLT languages #334

@larryonoff

Description

@larryonoff

Describe the bug
Pager scrolls in the opposite direction in RLT languages. User tries to scroll from top-to-bottom, but pager scrolls from bottom-to-top.

To Reproduce

    GeometryReader { geometry in
      let itemSize = CGSize(
        width: geometry.size.width,
        height: geometry.size.height - 63
      )

      if !itemSize.isEmpty {
        Pager(
          page: page,
          data: viewStore.state,
          id: \.self,
          content: { element in
            ...
          }
        )
        .alignment(.start)
        .itemSpacing(.itemSpacing)
        .preferredItemSize(itemSize, alignment: .start)
        .sensitivity(.high)
        .vertical()
        .templatePreviewSize(itemSize)
     }
  }

Expected behavior
Pager scrolls in the same direction user scrolls.

Environment:

  • iOS: 15, 16, 17
  • Device: Any iPhone
  • SwiftUIPager version: 2.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions