Swiftpack.co - stateman92/AdaptiveSheet as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by stateman92.
stateman92/AdaptiveSheet 0.0.2
A Sheet that has adaptive size based on its content! 📃
⭐️ 3
🕓 15 weeks ago
iOS
.package(url: "https://github.com/stateman92/AdaptiveSheet.git", from: "0.0.2")

AdaptiveSheet

A Sheet that has adaptive size based on its content! 📃

Setup

Add the following to Package.swift:

.package(url: "https://github.com/stateman92/AdaptiveSheet", exact: .init(0, 0, 2))

Or add the package in Xcode.

Usage

VStack(spacing: 16) {
    Button("Show small sheet") {
        showSmallSheet.toggle()
    }
    .adaptiveSheet(isPresented: $showSmallSheet) {
        Rectangle()
            .fill(.blue)
            .frame(height: 100)
    }

    Button("Show big sheet") {
        showBigSheet.toggle()
    }
    .adaptiveSheet(isPresented: $showBigSheet) {
        Rectangle()
            .fill(.blue)
            .frame(height: 1500)
    }
}

For details see the Example app.

Example

Example

GitHub

link
Stars: 3
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics