I am trying to add TouchBar support for my MacOS app in SwiftUI.
I found that I have to call ..
NSApp.isAutomaticCustomizeTouchBarMenuItemEnabled = true
.. in my AppDelegate. But what is now the best way to create the TouchBar
? Can I add it inside the Storyboard of the menu of my Mac app or do I need to create it programmatically?
When I follow Apple documentation I get to this point:
You create a Touch Bar by adding one to a view controller in the storyboard, or by creating one programmatically by overriding NSResponder's makeTouchBar() function.
Is it possible to create an own NSViewController and then embed it in NSNiewController representable?
Maybe anyone has a good advice how I can support TouchBar in SwiftUI.