iOS 坐标系转换

已知button的frame,如果要计算button相对于view的frame,则可以使用以下方法

CGRect rc = [btn.superview convertRect:btn.frame toView:self.view];

猜你喜欢

转载自www.cnblogs.com/qqcc1388/p/10617312.html