2
我想显示从选择的下一个视图的导航栏标题中选择的uitablevicell的文本。有关这个的任何想法?如何在下一个视图上获取单元格的文本点击uitableview中的单元格
我想显示从选择的下一个视图的导航栏标题中选择的uitablevicell的文本。有关这个的任何想法?如何在下一个视图上获取单元格的文本点击uitableview中的单元格
在你委托方法:线应读作的UITableViewCell *细胞= [的tableView的cellForRowAtIndexPath:indexPath],而不是作为indexpath.row在上面给定的代码在这里需要
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]
nextViewController.title = cell.text;
[self.navigationController pushViewController:nextViewController animated:YES];
}
校正。 – 2011-11-03 17:59:36