Swiftpack.co - Package - fermoya/SwiftUIPager

SwiftUIPager

CI codecov Swift Package Manager compatible Cocoapods Carthage compatible CocoaPods platforms License: MIT

SwiftUIPager provides a Pager component built with SwiftUI native components. Pager is a view that renders a scrollable container to display a handful of pages. These pages are recycled on scroll, so you don't have to worry about memory issues. Pager will load just a handful of items, enough to beatifully scroll along.

Create vertical or horizontal pagers, align the cards, change the direction of the scroll, animate the pagination... Pager lets you do anything you want.

Requirements

  • iOS 13.0+
  • macOS 10.15+
  • watchOS 6.0+
  • tvOS 13.0+
  • Swift 5.1+

Installation

CocoaPods

pod 'SwiftUIPager'

Swift Package Manager

In Xcode:

Carthage

github "fermoya/SwiftUIPager"

Manually

  • Download SwiftUIPager.xcframework
  • Create a group Frameworks inside your project and drag and drop SwiftUIPager.xcframework
  • Make sure in your target's build phases that the option Embed & Sign is selected:

Known Issues

  • NavigationLink and Button might work oddly with Pager if pagingPriority(.simultaneous) is used in SwiftUI 1.0 and iOS 13. This issue isn't reproducible in iOS 14 beta. For more information, follow this link.
  • Depending on the Xcode version, you might run into a precondition failure affecting SwiftUI 1.0 and iOS 13. This issue doesn't occur on Xcode 12 beta. For more information about workarounds, see Precondition failure: invalid value type for attribute #60.

Feedback

If you happen to encounter any problem or you have any suggestion, please, don't hesitate to open an issue or reach out to me at fmdr.ct@gmail.com.
This is an open source code project, so feel free to collaborate by raising a pull-request or sharing your feedback.

Support Open Source

If you love this library, understand all the effort it takes to maintain it and would like to support me, you can buy me a coffee by following this link:

You can also sponsor me by hitting the GitHub Sponsor button. All help is very much appreciated.

License

SwiftUIPager is available under the MIT license. See the LICENSE file for more info.

Github

link
Stars: 309

Dependencies

Used By

Total: 0

Releases

1.14.0-beta.4 -

Features

  • New modifier to switch back to singlePagination and provide a reveal ratio
  • New modifiers to keep track of the dragging onDraggingChanged and onDraggingEnded
  • New modifier to disable bounces

1.14.0-beta.3 -

Features

  • New modifier to switch back to singlePagination and provide a reveal ratio

Fixes

  • Enhancement on the pagination animation

1.14.0-beta.2 -

Features

  • New modifier to switch back to singlePagination and provide a reveal ratio

Fixes

  • Enhancement on the pagination animation

1.14.0-beta.1 -

Fixes

  • Enhancement on the pagination animation

1.13.0 -

Features

  • Accepting RandomeAccessCollection in the initializer rather than Array

Enhancements

  • Updated action versions
  • Extracted scripts from git flows

1.13.0-beta.13 -

Features

  • New modifier to adjust pagination sensitivity

Fixes

  • Fixed animation disabled with infinite pagers

1.13.0-beta.12 -

Features

  • Accepting RandomeAccessCollection in the initializer rather than Array

Enhancements

  • Updated action versions
  • Extracted scripts from git flows

1.13.0-beta.11 -

Features

  • Accepting RandomeAccessCollection in the initializer rather than Array

Enhancements

  • Updated action versions
  • Extracted scripts from git flows

1.13.0-beta.10 -

Features

  • Accepting RandomeAccessCollection in the initializer rather than Array

Fixes

  • Updated action versions

1.13.0-beta.9 -

Features

  • Accepting RandomeAccessCollection in the initializer rather than Array

Fixes

  • Updated action versions

1.13.0-beta.7 -

Features

  • Accepting RandomeAccessCollection in the initializer rather than Array

Fixes

  • Updated action versions

1.13.0-beta.1 -

Features

  • Accepting RandomeAccessCollection in the initializer rather than Array

1.12.0 -

Features

  • New modifier to adjust pagination sensitivity

Fixes

  • Fixed animation disabled with infinite pagers

1.12.0-beta.2 -

Features

  • New modifier to adjust pagination sensitivity

Fixes

  • Fixed animation disabled with infinite pagers

1.12.0-beta.1 -

Features

  • New modifier to adjust pagination sensitivity

Fixes

  • Fixed animation disabled with infinite pagers

1.11.2-beta.2 -

Features

  • Workaround animation(nil)

1.11.0 -

Features

  • Changes in workflows to publish Beta releases

1.11.0-beta.4 -

Features

  • Changes in workflows to publish Beta releases

1.11.0-beta.3 -

Features

  • Changes in workflows to publish Beta releases

1.10.4 -

Fixes

  • New workflow to compile all platforms

1.10.3 -

Fixes

  • New modifier to avoid delaying touches

1.10.2 -

Fixes

  • Uploading code coverage to Codecov
  • Running test also on develop: pull-request and push

1.10.1 -

Fixes

  • Continuous Integration create_relaase workflow

1.10.0 -

Features

  • New onDraggingStart modifier to get notified then the page-dragging starts

1.9.2 -

Fixes

  • #88 Returning page negative on page changed callback

1.9.1 -

Fixes

  • Dragging Velocity wasn't updating

1.9.0 -

Features

  • #73 Adding multiplePagination to scroll multiple pages.
  • Adding option to repeat input elements in looping pagers

Fixes

  • #74 ScrollView in Pager causes pages to be partially seen when diagonal scroll
  • #76 Fixing preview not loading with Pager

1.9.0-beta.4 -

Features

  • #73 Adding multiplePagination to scroll multiple pages.
  • Adding option to repeat input elements in looping pagers

Fixes

  • #74 ScrollView in Pager causes pages to be partially seen when diagonal scroll

1.9.0-beta.3 -

Features

  • Adding multiplePagination to scroll multiple pages.
  • Adding option to repeat input elements in looping pagers

Fixed

  • Not normalizing dragging offset if multiple pagination is supported

1.9.0-beta.2 -

Features

  • Added multiplePagination to scroll multiple pages.

Fixed

  • Not normalizing dragging offset if multiple pagination is supported