【发布时间】:2011-12-29 19:03:30
【问题描述】:
所以我的 ViewController 中有两个 UITableView,如何将第二个的委托和数据源设置为另一个 UITableViewController 文件的委托和数据源。
对于第二个,我目前正在这样创建它
//now add our second tableview
UITableView *addPapersTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 415)];
addPapersTableView.dataSource = self;
addPapersTableView.delegate = self;
[addPapersView addSubview:addPapersTableView];
并且由于self 位,它明显地提取数据并从同一个文件中委派。
我会做类似#import "AddMoreTableViewController.h" 之类的事情吗?
对 Objective C 来说真的很陌生,
非常感谢,
敏捷
【问题讨论】:
标签: ios objective-c uitableview cocoa-touch uikit