15、获取控件 在 tableViewCell 的位置

2016-04-13  本文已影响87人  天听云道

找 Btn 在那个cell上,计算好几层父视图就写几个superview

    UITableViewCell * cell = (UITableViewCell *)[[[btn superview] superview] superview];
    NSIndexPath * path = [self.tableView indexPathForCell:cell];
    NSInteger sectionIndex = [path section];
    NSInteger rowIndex = [path row];
上一篇 下一篇

猜你喜欢

热点阅读