How to add a scrollview in Touch Bar in Storyboard?

为君一笑 提交于 2019-12-08 14:49:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!