title: SwiftUI How to add action on UIBarButtonItem?
body: <p>I am using SwiftUI and I have added Button in NavigationBar but I am unable to set action on that button. I tried these two approaches but failed.</p>
  
  <p><strong>Approach:1</strong></p>
  
  <pre><code>.navigationBarTitle("\(task.label)")
  .navigationBarItems(trailing: UIBarButtonItem(title: "Done", style: .plain, target: self, action: #selector(self.actionName)))
  </code></pre>
  
  <p>But I am having this error here </p>
  
  <blockquote>
    <p>Argument type 'UIBarButtonItem' does not conform to expected type
    'View'</p>
  </blockquote>
  
  <p><strong>Approach:2</strong> </p>
  
  <pre><code>.navigationBarTitle("\(task.label)")
  .navigationBarItems(trailing: NavigationBarButtonItem())
  
  struct NavigationBarButtonItem : View {
      var body : some View {
          Button(action: {
              print("Button Tapped")
          }, label: {Text("Done")})
      }
  }
  </code></pre>
  
  <p>Over here, This print statements never runs, although Button "Done" shows on Right side of NavigationBar, but action never works.</p>