Skip to content

Instantly share code, notes, and snippets.


Swift Apps mobilinked

View GitHub Profile
mobilinked / gist:9b6086b3760bcf1e5432932dad0813c0
Last active December 23, 2022 08:14
SwiftUI - prevent auto dismiss the sheet by drag down
View gist:9b6086b3760bcf1e5432932dad0813c0
// Created by 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()")