获取tableView(collection)中某一个cell相
作者:
sttech | 来源:发表于
2017-05-11 12:58 被阅读0次
在tableView 中
获取cell相对于tableView的frame
CGRect rectInTableView = [tableView rectForRowAtIndexPath:indexPath];
获取相对于self.view的frame
CGRect rect = [tableView convertRect:rectInTableView toView:[tableView superview]];
在collection中
CGRect cellInCollection = [_collection convertRect:cell.frame toView:_collection];
//获取cell在当前屏幕的位置
CGRect cellInSuperview = [_collection convertRect:cellInCollection toView:self.view];
本文标题:获取tableView(collection)中某一个cell相
本文链接:https://www.haomeiwen.com/subject/crjotxtx.html
网友评论