通过当前坐标 转换成 对应的屏幕坐标

来源:互联网 发布:类似filezilla的软件 编辑:程序博客网 时间:2024/05/18 13:30
有时候 项目 往往有这样一个需求 

一个vc中 有两个view 


我获得的控件 在第二个view中

我想知道 这个控件 对应屏幕 0 0点的坐标是多少

解决的办法 就是 

 GMGridViewCell *getCurrentCell = [gridViewcellForItemAtIndex:position];

    

    //根据当前相对坐标转换过来 

   getCurrentCell.frame =  [getCurrentCellconvertRect:getCurrentCell.boundstoView:self.view];



原创粉丝点击