SheetDetentsModifier
This is a small View modifier that adds detents for native .sheet representations that appeared in iOS 16
Install / Use
/learn @bartleby/SheetDetentsModifierREADME
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
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
