(Q) How do I make an UIBarButtonItem?

Hello, All


Do you know how to make an UIBarButtonItem using SwiftUI?

Throughout WWDC 2019, I didn't watch these presentations and samples as well as find in the libarary, Xcode 11 beta.

Thanks,


Jinho

Does something like this work?


.navigationBarItems(trailing:
  Button(action: {
     print("HI")
  }) {
    Text("Say hi")
  }
)

or, if you want to take advantage from the new icons:


.navigationBarItems(trailing: Button(action: {
  print("ich!")
}, label: {
  Image(systemName: "plus.circle")
  .imageScale(Image.Scale.large)
}))

Hi all, thanks for your support. - Jinho

(Q) How do I make an UIBarButtonItem?
 
 
Q