/PopupSwiftUI

Custom popup in SwiftUI

Primary LanguageSwiftThe UnlicenseUnlicense

Article related to this project


PopupSwiftUI

The project demonstrates how to implement a custom popup in SwiftUI.

Usage:

struct Popup_Previews: PreviewProvider {
    static var previews: some View {
        Color.clear
            .modifier(Popup(isPresented: true, // <--- Add the popup view modifier
                            content: { Color.yellow.frame(width: 100, height: 100) }))
            .previewDevice("iPod touch")
    }
}

Result:

Loading Indicator Snackbar Message
How to show a popup in SwiftUI How to show a popup in SwiftUI