A Sheet that has adaptive size based on its content! 📃
Add the following to Package.swift
:
.package(url: "https://github.com/stateman92/AdaptiveSheet", exact: .init(0, 0, 2))
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.
link |
Stars: 3 |
Last commit: 2 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics