SkillAgentSearch skills...

SheetDetentsModifier

This is a small View modifier that adds detents for native .sheet representations that appeared in iOS 16

Install / Use

/learn @bartleby/SheetDetentsModifier
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

SheetDetentsModifier

This is a small View modifier that adds detents for .sheet representations that appeared in iOS 16

It works starting with iOS 15 ⚠️

Install

SwiftPM

https://github.com/bartleby/SheetDetentsModifier.git

Examples

struct ContentView: View {
    @State var showSheet: Bool = false
    var body: some View {
        VStack {
            Button("Show") {
                showSheet.toggle()
            }
        }
        .sheet(isPresented: $showSheet) {
            VStack {
                Button("Hide") {
                    showSheet.toggle()
                }
            }
            .presentationDetents([.medium, .large])
            .ignoresSafeArea() // To remove the white strip on the iPhone 10+
        }
    }
}

Make a star ❤️‍🔥

Related Skills

View on GitHub
GitHub Stars20
CategoryDevelopment
Updated3mo ago
Forks1

Languages

Swift

Security Score

77/100

Audited on Dec 24, 2025

No findings