swiftmacosmacos-sierranstouchbar

How to have a Touch Bar button which is image only?


Adding touch bar buttons into touch bar of macOS, with images of size 80x60, ends up like this:

Touch Bar with buttons

The button has been scaled to 40x30, but instead of a button filled up by image, it has the left/right padding on the side of button. Is it possible to have actual size of touch bar buttons without the padding?


Solution

  • You have to use Image Button from object library, but you have to include it into the Touch Bar View which you can find in object library.

    Output looks like this:

    enter image description here