我该如何在UITableView中添加一个section标题?
如果你只需要节标题,可以使用UITableViewDataSource方法:
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
或者你可以使用UITableViewDelegate方法将自定义视图设置为表头:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
实现这些功能的控制器需要成为您表视图的委托/数据源。