title: Inform view that alert OK button is clicked in swiftUI
body: <p>I have created a <code>ViewModifier</code> to show alert with 2 buttons. How to inform my ContentView that OK button is clicked, so that I can perform button action?</p>
  
  <p>Sample code: ShowAlert is my custom ViewModifier</p>
  
  <pre><code>struct ShowAlert: ViewModifier {
  
      @Binding var showingAlert: Bool
      let title: String
      let message: String    
  
      func body(content: Content) -&gt; some View {
          content
              .alert(isPresented: $showingAlert) { () -&gt; Alert in
                  Alert(title: Text(title), message: Text(message),
                      primaryButton: .default (Text("OK")) {
                        print("OK button tapped") 
                        //How to trigger ok button clicked event to my content view
                  },secondaryButton: .cancel())
          }
      }
  }
  </code></pre>
  
  <p>View Implementation</p>
  
  <pre><code>       ScrollView {
                  ....
              }.navigationBarTitle("Click")
              .navigationBarItems(trailing: Button(action: {
                  self.showAlert = true
              }) {
                  Image(systemName: "lock")
              }.modifier(ShowAlert(showingAlert: $showAlert, title: "", message: "Are you sure you want to Logout")) 
  </code></pre>