iPhone correct landscape window coordinates

前端 未结 5 1063
终归单人心
终归单人心 2021-02-15 15:31

I am trying to get the window coordinates of a table view using the following code:

[self.tableView.superview convertRect:self.tableView.frame toView:nil]

5条回答
  •  迷失自我
    2021-02-15 15:56

    Try bounds instead of frame self.parentViewController.view.bounds for it gives me adjusted coords according to the current orientation

提交回复
热议问题