SwiftUIPopUp

SwiftUIPopUp is a the SwiftUI way to implement pop ups in your app. Credits go to PartialSheet for great deal of inspiration.

Features

  • Custom popup content
  • Popup grows with content size
  • The popup can be moved with an offset

Manual

  1. Step: Register the PopUpManager on your root view

@main
struct YourApp: App {
    var body: some Scene {
        MainView()
            .attachPopupToRoot()
    }
}
  1. Step: Add the method popup() {...} to your SwiftUI View

@State var timerPopUpIsPresented = false
...
LowLevelView()
    .popup(isPresented: $isPresented,
               offset: (x: x, y: y)) {
            YourCustomPopupView()
        }

GitHub

View Github