let rect1 = sender.convert(sender.frame, from: cell.selectView)
let rect2 = sender.convert(rect1, to: UIApplication.shared.keyWindow)
print(rect2)
其中sender.frame为想要获取在window上位置的控件的frame
cell.selectView为sender.父控件
let rect1 = sender.convert(sender.frame, from: cell.selectView)
let rect2 = sender.convert(rect1, to: UIApplication.shared.keyWindow)
print(rect2)
其中sender.frame为想要获取在window上位置的控件的frame
cell.selectView为sender.父控件