如果想知道一个view相对于屏幕或者另外一个view 的坐标,那么可以通过如下的方法得到:

UIWindow * window=[[[UIApplication sharedApplication] delegate] window];

CGRect rect=[view convertRect: view.bounds toView:window];

相关文章:

  • 2022-12-23
  • 2021-10-29
  • 2021-07-24
  • 2021-08-14
  • 2021-08-03
  • 2021-05-21
  • 2021-10-16
  • 2021-12-14
猜你喜欢
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
相关资源
相似解决方案