Skip to content

V8tr/PopupSwiftUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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