Skip to content

Instantly share code, notes, and snippets.

Avatar

Swift Apps mobilinked

View GitHub Profile
@mobilinked
mobilinked / gist:9b6086b3760bcf1e5432932dad0813c0
Last active Jul 12, 2022
SwiftUI - prevent auto dismiss the sheet by drag down
View gist:9b6086b3760bcf1e5432932dad0813c0
//
// Created by https://quickplan.app on 2020/11/8.
//
import SwiftUI
/// Control if allow to dismiss the sheet by the user actions
/// - Drag down on the sheet on iPhone and iPad
/// - Tap outside the sheet on iPad
/// No impact to dismiss programatically (by calling "presentationMode.wrappedValue.dismiss()")