I want to develop an app with touch bar. I searched on internet and saw some tutorials. They all make a demo with windowcontroller and just override makeTouchBar()
or drag touchbar in storyboard then there is a touchbar. But I want to make touchbar be different in viewcontroller. Then I draged a touchbar into a viewcontroller in storyboard and bind the touchbar in viewcontroller.
bind(#keyPath(touchBar), to: self, withKeyPath: #keyPath(touchBar), options: nil)
But when I run the project I can't find my touchbar and then I print touchbar.isVisible and I found that the value is false.
So how to show a touchbar in a viewcontroller. Thanks!