如何为Cocoa Swift使用Xcode对象库构建插入删除表单? [英] How to build Insert Remove Form with Xcode Object Library for Cocoa Swift?
问题描述
Mac版Rocket 具有首选项窗口,该窗口具有以下形式:像下面这样插入&删除应用.
Rocket for Mac has a Preferences Window in which it has a form like below to insert & remove an app.
我想制作一个这样的表格,但是我应该如何建立它呢?我是可可开发的新手,所以这很明显.
I want to make a form like that but how should I build it? I am new to Cocoa development so this might be obvious.
我想在这些应用中制作一个标签为禁用火箭的:
I want to make the one with the label Disable Rocket within these apps:
推荐答案
我找到了解决方案.
我所做的是将NSTableView
与单个列用于文本框.并使用行为属性将其中的NSTextField
设置为可文本编辑.
What I did was use NSTableView
with single column for the textbox. And made the NSTextField
in it to be text editable using the Behaviour attribute.
然后为+& -按钮我使用了2 NSPopupButton
&将Image
属性设置为NSAddTemplate
& NSRemoveTemplate
,默认存在于Xcode中.其中还有许多其他默认图片.
Then for the + & - button I used 2 NSPopupButton
& made the Image
attribute to be NSAddTemplate
& NSRemoveTemplate
which exists by default in Xcode. There are bunch of other images that are default in it.
那对我来说解决了:)
这篇关于如何为Cocoa Swift使用Xcode对象库构建插入删除表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!