-
- - (CGPoint)convertPoint:(CGPoint)point toView:(UIView *)view;
-
- - (CGPoint)convertPoint:(CGPoint)point fromView:(UIView *)view;
-
-
- - (CGRect)convertRect:(CGRect)rect toView:(UIView *)view;
-
- - (CGRect)convertRect:(CGRect)rect fromView:(UIView *)view;
例把UITableViewCell中的subview(btn)的frame转换到 controllerA中
-
-
- CGRect rc = [cell convertRect:cell.btn.frame toView:self.view];
- 或
- CGRect rc = [self.view convertRect:cell.btn.frame fromView:cell];
-
-
- 或当已知btn时:
- CGRect rc = [btn.superview convertRect:btn.frame toView:self.view];
- 或
- CGRect rc = [self.view convertRect:btn.frame fromView:btn.superview];
转自:http://blog.csdn.net/xuhuan_wh/article/details/8486337
坐标转换,布布扣,bubuko.com
坐标转换
原文:http://www.cnblogs.com/xyzaijing/p/3729381.html