How to hide control strip of nstouchbar programmatically?

355 Views Asked by At

Is there any way to hide controlstrip of NSTouchBar programmatically? NSPopOverTouchBarItem has a private property showsControlStrip. But how do I make use of this private property?

Thank you.

1

There are 1 best solutions below

1
On

There's no API to persistently hide the Control Strip. There are cases where the Control Strip is temporarily suppressed to accommodate other UI (e.g. while using press-and-hold popover items), but this tends to be for transient UI only.

The Control Strip's visibility is configurable under Keyboard preferences, so permanently hiding it could contradict the user's explicit preference.