问题
I am adding a few buttons to the Touch Bar in storyboard, everything works fine except that I can only fit about 4 buttons in there (since the buttons contain both image and text) in my education app.
I would like to add a scrollview to contains all the buttons, but does not seem to be able to drag a ScrollView into the Touch Bar. What is the best way to have a scrollable set of buttons in Touch Bar?
回答1:
You firstly need to insert Touch Bar View which can then contian NSScrollView.
It should look like this:
Then the final output looks like this:
来源:https://stackoverflow.com/questions/40611303/how-to-add-a-scrollview-in-touch-bar-in-storyboard