ios:点击tablecell中的一个按钮,确定cell所在的行
2012-07-18 14:45
375 查看
在设置的BUTTON的selector的方法中如下设置:
- (void)button:(id)sender {
UITableViewCell * cell = (UITableViewCell *)[[sender superview] superview];
NSIndexPath * path = [self.tableView indexPathForCell:cell];
NSLog(@"index row%d", [path row]);
}
- (void)button:(id)sender;方法是我设置的button的selector
- (void)button:(id)sender {
UITableViewCell * cell = (UITableViewCell *)[[sender superview] superview];
NSIndexPath * path = [self.tableView indexPathForCell:cell];
NSLog(@"index row%d", [path row]);
}
- (void)button:(id)sender;方法是我设置的button的selector
相关文章推荐
- ios:点击tablecell中的一个按钮,确定cell所在的行
- 点击tablecell中的一个按钮,确定cell所在的行
- 点击tablecell中的一个按钮,确定cell所在的行
- ios:点击tableView中的一个按钮,确定cell所在的行
- UIWebView中链接调用Safari打开目标链接 点击cell里面的一个按钮如何确定按钮所在的cell的行
- iOS点击Cell中的按钮时,取所在的Cell
- 点击tableViewCell中的一个按钮,打印cell所在的行
- 自定义了一个tableViewCell,cell里添加了一个按钮,怎样确定按钮所在的单元格的索引
- iOS UITableView中关于cell里的按钮被点击时如何确定是哪一个section
- iOS点击cell上的某一个按钮时 如何获得点击的是第几个cell
- iOS UITableView中关于cell里的按钮被点击时如何确定是哪一个section
- iOS UITableView中关于cell里的按钮被点击时如何确定是哪一个section
- 点击某一个cell中的button,确定这个button所在的行(找superview)
- iOS UITableView中关于cell里的按钮被点击时如何确定是哪一个section
- 点击某一个cell中的button,确定这个button所在的行(找superview)
- iOS微信支持遇到的问题:只显示一个确定按钮、onResp不回调、闪回
- iOS 自定义UITableViewCell上添加UIButton按钮如何确定点击了哪一行,代码块实现
- ios 动态添加了按钮,绑定同一个点击事件,如何判断点击的是哪个?
- ios tableCell 中同时获取点击的位置和所在的indexPath
- iOS 一一 自定义cell按钮的点击事件(KVO)