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

Last update: Jul 26, 2022

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 ❤️‍🔥

GitHub

https://github.com/bartleby/SheetDetentsModifier
You might also like...

Action sheet allows including your custom views and buttons.

Action sheet allows including your custom views and buttons.

CustomizableActionSheet Action sheet allows including your custom views and buttons. Installation CocoaPods Edit your Podfile: pod 'CustomizableAction

Nov 26, 2021

Present a sheet ViewController easily and control ViewController height with pangesture

Present a sheet ViewController easily and control ViewController height with pangesture

PanControllerHeight is designed to present a sheet ViewController easily and control ViewController height with pangesture.

May 3, 2022

SwiftUI Draggable Bottom Sheet

SwiftUI Draggable Bottom Sheet

Mar 3, 2022

Bottom Sheet component is widely used in Joom application

Bottom Sheet Bottom Sheet component is widely used in Joom application Installation Swift Package Manager Swift Package Manager is a tool for managing

Jul 30, 2022

A SwiftUI Partial Sheet fully customizable with dynamic height

A SwiftUI Partial Sheet fully customizable with dynamic height

A SwiftUI Partial Sheet fully customizable with dynamic height

Aug 4, 2022

DGBottomSheet - The lightest swift bottom sheet library

DGBottomSheet - The lightest swift bottom sheet library

DGBottomSheet Requirements Installation Usage DGBottomSheet The lightest swift b

Aug 6, 2022

Share-sheet-example - A sample project that reproduces an issue with Share Sheets

Hello, DTS! This project demonstrates the issue I'm having with the Share Sheet.

Feb 11, 2022

SplitSheet - A lightweight, fully interactive split-screen sheet.

SplitSheet - A lightweight, fully interactive split-screen sheet.

SplitSheet A lightweight, fully interactive split-screen sheet. Powered by UIScrollView for super-smooth gestures. Show/hide either programmatically o

Jul 22, 2022

Emulates the native Remote Notification View.

Emulates the native Remote Notification View.

Introduction HDNotificationView appears notification view like system. Requirement iOS 9.0+ Installation Carthage github "nhdang103/HDNotificationView

Jul 1, 2022
BottomSheet makes it easy to take advantage of the new UISheetPresentationController in SwiftUI with a simple .bottomSheet modifier on existing views.
BottomSheet makes it easy to take advantage of the new UISheetPresentationController in SwiftUI with a simple .bottomSheet modifier on existing views.

BottomSheet makes it easy to take advantage of the new UISheetPresentationController in SwiftUI with a simple .bottomSheet modifier on existing views.

Jul 31, 2022
BottomSheetDemo - Bottom sheet modal view controller with swift
BottomSheetDemo - Bottom sheet modal view controller with swift

当我们想弹出一个预览视图,bottom sheet modal view controller 非常实用。在 iOS 中,长按拖拽手势可以让 controlle

Jul 28, 2022
A Swift extension that adds toast notifications to the UIView object class.
A Swift extension that adds toast notifications to the UIView object class.

Toast-Swift Toast-Swift is a Swift extension that adds toast notifications to the UIView object class. It is intended to be simple, lightweight, and e

Aug 9, 2022
An iOS library for SwiftUI to create draggable sheet experiences similar to iOS applications like Maps and Stocks.

An iOS library for SwiftUI to create draggable sheet experiences similar to iOS applications like Maps and Stocks.

Aug 11, 2022
A Google like action sheet for iOS written in Swift.
A Google like action sheet for iOS written in Swift.

MaterialActionSheetController Lightweight and totally customizable. Create and present it the way you do with UIAlertController. Screenshots Demo | De

Jun 29, 2022
Customizable Dynamic Bottom Sheet Library for iOS
Customizable Dynamic Bottom Sheet Library for iOS

DynamicBottomSheet Powerd by Witi Corp., Seoul, South Korea. Fully Customizable Dynamic Bottom Sheet Library for iOS. This library doesn't support sto

May 7, 2022
Multiplatform (iOS, macOS) SwiftUI bottom sheet drawer. Expandable bottomsheet. Slide out bottom menu
Multiplatform (iOS, macOS) SwiftUI bottom sheet drawer. Expandable bottomsheet. Slide out bottom menu

Multiplatform (iOS, macOS) SwiftUI bottom sheet drawer Features It does not re-render the background content while manipulating with the sheet iOS and

Aug 2, 2022
A Swift library to provide a bouncy action sheet
A Swift library to provide a bouncy action sheet

Hokusai is a Swift library that provides a bouncy action sheet. It will give the users a fancy experience without taking pains coding the cool animati

Jun 29, 2022
Fully customizable and extensible action sheet controller written in Swift
Fully customizable and extensible action sheet controller written in Swift

XLActionController By XMARTLABS. XLActionController is an extensible library to quickly create any custom action sheet controller. Examples The action

Aug 3, 2022
Dice roller, character sheet/ creator, and monster/item info app on the iphone12

DnD-LordDogMaw This file will be the start of a side project in the hopes of creating an iphone12 app for Dungeons and Dragons! This app will have 3 m

Sep 17, 2021