点击UITableView Cell 上面按钮 ,获取在整个屏幕

2017-06-09  本文已影响0人  yscGr

以下步骤写在 cell上button的点击事件中

UITableViewCell*cell=(UITableViewCell*)btn.superview.superview;

NSIndexPath *indexPath = [yourTab indexPathForCell:cell];

CGRect rectInTableView = [yourTab rectForRowAtIndexPath:indexPath];

CGRect rect = [yourTab convertRect:rectInTableView toView:[yourTab superview]];

上一篇下一篇

猜你喜欢

热点阅读