只需在tableview中添加一行即可

时间:2010-09-29 13:00:20

标签: iphone objective-c uitableview

NSString *ref = [item stringByMatching:myregex1 capture:2];
NSString *value = [item stringByMatching:myregex1 capture:3];

我只需要将它添加到我的orderTable uitableview,我该怎么做:P。我找不到一个简单的方法,请帮助:)

我希望它能像你这样的uitableview

(@"%@ :: %@", ref, value)

由于

2 个答案:

答案 0 :(得分:1)

您必须将此添加到您的dataSource,然后执行[orderTable reloadData];

答案 1 :(得分:0)

如果您希望它位于特定单元格中,请在方法cellForRowAtIndexPath:中检查第一个或最后一个单元格并执行:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  // Cell Return
  cell.textLabel.text = [NSString stringWithFormat@"%@ :: %@", ref, value];
}
相关问题