iOS 获取子视图在父视图中的坐标

来源:互联网 发布:win10自动优化 编辑:程序博客网 时间:2024/04/27 13:26


例:latitudeLongitude 是View 添加在 containerView上

       containerView 也是View 添加在 _scrollView上

      此时算出 latitudeLongitude 在 _scrollView中的 frame : 


     CGRect frame = [containerView convertRect:latitudeLongitude.frame toView:_scrollView];


1 0
原创粉丝点击