假如有一个UITableView 每一个cell中都有一个Label 当tableView滑动的时候,label在屏幕中的位置会发生变化 应该怎样去计算label在屏幕中的位置呢?
- (CGPoint)convertPoint:(CGPoint)point toView:(UIView *)view
CGRect rectInTableView = [tableView rectForRowAtIndexPath:indexPath];
CGRect rectInSuperview = [tableView convertRect:rectInTableView toView:[tableView superview]];
先计算cell的位置,再转化到view中的位置.