#pragma mark - UITableView点击跳转到DeviceStatusDetail页面
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// NSLog(@"点击了%ld,%ld",indexPath.section,indexPath.row);
UITableViewCell *cell = [tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row inSection:indexPath.section]];
NSString *text = [cell valueForKey:@"text"];// 获取点击的cell的text属性值
NSLog(@"点击了%@",text);
}
http://blog.youkuaiyun.com/jamiecheung
http://blog.youkuaiyun.com/u010841622
本文介绍了一个使用UITableView实现点击事件并跳转到详细页面的例子。通过点击UITableView中的单元格,可以获取到被点击单元格的文本内容,并记录下来。
5173

被折叠的 条评论
为什么被折叠?



