NSArrayController绑定NSTableView的方法
来源:互联网 发布:明通网络数码科技 编辑:程序博客网 时间:2024/05/16 14:28
NSArrayController绑定NSTableView的方法
1.在File’s Owner中創建NSMutableArray *employees
NSArrayController操作
2.拖NSArrayController到Object的列表
3.設置Attributes inspector->Object Controller, Mode選擇Class, Class Name填寫次array中object的類名字, 在 Keys中添加Object中需要現實的變量名字
4.在Binding inspector中,Controller Content點選content array設置Bind to,选择File’s Owner,在Model Key Path中填入1中Array的名字
NSTableView操作
5.拖NSTableView到nib中,點選table的一列,在Binding inspector->Value中點擊設置Bind to,
Controller Key設置為arrangedObjects, Model Key Path設置3步中的Object變量名字
6.将NSTableView设置为cell-based (NSTableView->Attributes inspector->TableView->Content Mode选择即可)
View based模式貌似不支持!!!
7.拖动Button,关联Acttion到NSArrayControler的Add和Remove动作等,实现自动操作。
需要访问时,可从employees中找到TableView中所有的对象
- NSArrayController绑定NSTableView的方法
- NSArrayController
- NSTableView的使用例子
- NSTableView的使用例子
- nstableview
- NSTableView行的拖拽
- 基于cell-base的NSTableView
- 基于cell-base的NSTableView
- 基于cell-base的NSTableView
- NSTableView的背景色设置
- NSArrayController,NSManagedObject
- xml和NSTableView的一些备注
- NSTableView支持右键显示菜单的方案
- iOS之UITableView和NSTableView的区别
- DataList绑定的方法
- listView的绑定方法
- TreeView的绑定方法
- 绑定类别的方法
- tomcat将端口8080改80方法
- spring TypeConverter (一)
- elasticsearch 查询(match和term)
- cell实现跑马灯效果
- Struts Problem Report
- NSArrayController绑定NSTableView的方法
- SSH 的详细使用方法
- poj-1276-Cash Machine
- dcloud开发app手势登录,oppo手机需要点一下才显示手势画板的问题
- ngDialog 一个简单的AngularJS模态框模板
- for each循环取值后多条修改提交至后台(SSH框架)
- 日志管理以及时间同步
- 2017武汉大学校赛网络预选赛d题
- cocos CCScrollView