The codebase supports iOS and requires Xcode 12.0 or newer
Installation
Xcode
Open your project. Navigate to File > Swift Packages > Add Package Dependency. Enter the url https://github.com/ericlewis/PageSheet and tap Next.
Select the PageSheet target and press Add Package.
Swift Package Manager
Add the following line to the dependencies in your Package.swift file:
If you are using Xcode 13.2.1 you can navigate to the Example folder and open the enclosed Swift App Playground to test various features (and see how they are implemented).
Presentation
PageSheet works similarly to a typical sheet view modifier.
PageSheet is split into three different modules, with PageSheetCore handling implementation
and PageSheetPlus providing a new modifier called sheetPreferences(_:).
The namesake module is PageSheet, which combines PageSheetCore & PageSheetPlus into a single import.
If you want to only use PageSheet without the fancy extra modifier (and extra dependency), then use PageSheetCore.
PageSheet
Customizable sheet presentations in SwiftUI. Using
UISheetPresentationControllerunder the hood.Features
sheetAPI under the hood, ensuring maximum compatibility & stability.sheetimplementation.UISheetPresentationControllerfrom any child views in the presented sheet’s content view.interactiveDismissDisabled(_:Bool)modifier.UISheetPresentationControllerconfiguration options.Environmentvalue.~44kBthin when installed via SwiftPM.Table of Contents
Requirements
The codebase supports iOS and requires Xcode 12.0 or newer
Installation
Xcode
Open your project. Navigate to
File > Swift Packages > Add Package Dependency. Enter the urlhttps://github.com/ericlewis/PageSheetand tapNext. Select thePageSheettarget and pressAdd Package.Swift Package Manager
Add the following line to the
dependenciesin yourPackage.swiftfile:Next, add
PageSheetas a dependency for your targets:A completed example may look like this:
Examples
Example Project
If you are using Xcode 13.2.1 you can navigate to the
Examplefolder and open the enclosed Swift App Playground to test various features (and see how they are implemented).Presentation
PageSheetworks similarly to a typicalsheetview modifier.PageSheetalso supports presentation via conditionalIdentifiableobjects.Customization
PageSheetcan also be customized using a collection of view modifiers applied to the sheet’s content.Module Documentation
PageSheet
PageSheetis split into three different modules, withPageSheetCorehandling implementation andPageSheetPlusproviding a new modifier calledsheetPreferences(_:). The namesake module isPageSheet, which combinesPageSheetCore&PageSheetPlusinto a single import.If you want to only use PageSheet without the fancy extra modifier (and extra dependency), then use
PageSheetCore.PageSheetCore
PageSheetPlus
License
PageSheet is released under the MIT license. See LICENSE for details.