在 Interface Builder 中创建按钮矩阵时遇到问题
我正在尝试在 Interface Builder 3.2.1 中创建按钮矩阵,但无论如何找不到。我阅读了此处发布的问题和答案:
10.6中如何在Interface Builder中创建NSImageCell的NSMatrix
但遵循布局>嵌入对象,按照建议,我只看到视图和滚动视图作为选项,而不是矩阵。我错过了什么吗?
谢谢。
I am trying to create a matrix of buttons in Interface Builder 3.2.1 but can not find anyway to do it. I read the question and answer posted here:
How to create a NSMatrix of NSImageCell in Interface Builder in 10.6
But following Layout > Embed Objects In, as suggested, I see only View and Scroll View as options, not Matrix. Have I missed something?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚在 IB 3.2.2 上尝试过:拖动窗口上的按钮,确保它被选中(只需单击一次,直到您可以看到它周围的八个蓝色手柄,而不是两次!) 。在这种情况下,菜单布局 ->嵌入对象将具有可用的矩阵选项。
现在,您可以按住 Option 键单击并拖动按钮的下手柄以水平添加更多按钮。同样,您可以在左侧、右侧或顶部添加按钮,从而创建所需的按钮矩阵。
编辑:此配方仅适用于 MacOS 开发,不适用于 iPhoneOS。我不知道 iPhone 上是否有相当于
NSMatrix
的东西。我想用户界面只是为了不包含这些元素。I have just tried it on IB 3.2.2: Drag the button on the window, make sure it is selected (only click it once until you can see the eight blue handles around it, not twice!). In this situation the menu Layout -> Embed Objects will have the Matrix option available.
Now you can option-click and drag the lower handle of the button to add more buttons horizontally. Similarly, you can add buttons to the left, to the right or at the top, thereby creating the desired matrix of buttons.
EDIT: This recipe only works when developing for MacOS, not for iPhoneOS. I am not aware of an equivalent of
NSMatrix
on the iPhone. I guess the UI is simply meant to not include such elements.