Contents

fermoya/swiftuipager

_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 hand

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:

  • File ⭢ Swift Packages ⭢ Add Package Dependency...
  • Use the URL https://github.com/fermoya/SwiftUIPager.git

Carthage

github "fermoya/SwiftUIPager"

Manually

  • Download SwiftUIPager.xcframework
  • Create a group Frameworks inside your project and drag and drop SwiftUIPager.xcframework

<img src="resources/installation/manual-installation-step-1.png" alt="Manual Installation Step 1" width="229"/>

  • Make sure in your target's build phases that the option Embed & Sign is selected:

<img src="resources/installation/manual-installation-step-2.png" alt="Manual Installation Step 2" width="755"/>

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:

<a href="https://www.buymeacoffee.com/fermoya" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>

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.

Package Metadata

Repository: fermoya/swiftuipager

Default branch: main

README: README.md