美文网首页扩展知识
iOS开发-坐标转换(- (CGRect)convertRect

iOS开发-坐标转换(- (CGRect)convertRect

作者: 037e3257fa3b | 来源:发表于2016-11-21 16:22 被阅读290次
convertRect.png
convert :转换,转变

// 将像素point由point所在视图转换到目标视图view中,返回在目标视图view中的像素值  
- (CGPoint)convertPoint:(CGPoint)point toView:(UIView *)view;  
// 将像素point从view中转换到当前视图中,返回在当前视图中的像素值  
- (CGPoint)convertPoint:(CGPoint)point fromView:(UIView *)view;  
  
// 将rect由rect所在视图转换到目标视图view中,返回在目标视图view中的rect  
- (CGRect)convertRect:(CGRect)rect toView:(UIView *)view;  
// 将rect从view中转换到当前视图中,返回在当前视图中的rect  
- (CGRect)convertRect:(CGRect)rect fromView:(UIView *)view;

相关文章

网友评论

    本文标题:iOS开发-坐标转换(- (CGRect)convertRect

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