有时候 项目 往往有这样一个需求
一个vc中 有两个view
我获得的控件 在第二个view中
我想知道 这个控件 对应屏幕 0 0点的坐标是多少
解决的办法 就是
GMGridViewCell *getCurrentCell = [gridView cellForItemAtIndex:position];
//根据当前相对 坐标转换过来
getCurrentCell.frame = [getCurrentCell convertRect:getCurrentCell.bounds toView:self.view];
本文详细介绍了如何在iOS开发中,通过代码实现从VC中的第二个view获取特定控件相对于屏幕的坐标,包括关键步骤和示例代码。
1748

被折叠的 条评论
为什么被折叠?



