【发布时间】:2010-01-10 17:59:41
【问题描述】:
我在 Interface Builder 的 ViewController 中添加了一个 UITableView 组件,以便更容易自定义,因为 UITableViewController 不允许我设置背景图像。
然后我实现了一些基本功能,只是为了测试它是否有效,但无法让它显示任何单元格 - 有人对如何让它工作有任何建议吗?
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 3;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 1) {
return 2;
}
else {
return 1;
}
}
我创建了一个名为 tripSettings 的 UITableView IBOutlet 并将其连接为参考插座
【问题讨论】:
标签: iphone xcode uitableview interface-builder