您的位置:首页 > 移动开发 > IOS开发

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐