美文网首页
点击UITableView Cell 上面按钮 ,获取在整个屏幕

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

作者: yscGr | 来源:发表于2017-06-09 11:27 被阅读0次

以下步骤写在 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]];

相关文章

网友评论

      本文标题:点击UITableView Cell 上面按钮 ,获取在整个屏幕

      本文链接:https://www.haomeiwen.com/subject/zkgxqxtx.html