如何获得UITableViewCell 在屏幕中的位置

2025-02-24 22:35:43
推荐回答(2个)
回答1:

  CGRect rectInTableView = [tableView rectForRowAtIndexPath:indexPath];
  CGRect rectInSuperview = [tableView convertRect:rectInTableView toView:[tableView superview]];

  先计算cell的位置,再转化到view中的位置.

回答2:

GetWindowRect,if you need know more,please go to baidu baike