UITableViewCell 中的Button事件向上寻找当前Cell

原创
2013/08/13 09:29
阅读数 2.1K
// self.tableView 就是 UITableView对象实例   
 CGRect buttonRect = button.frame;
    for (UITableViewCell *cell in [self.tableView visibleCells]) {
        // 判断两个区域是否相交
        if (CGRectIntersectsRect(buttonRect, cell.frame)) {
            NSLog(@"%@", cell);
        }
    }
展开阅读全文
加载中
点击加入讨论🔥(8) 发布并加入讨论🔥
打赏
8 评论
2 收藏
0
分享
返回顶部
顶部