0
我有一个iPad应用程序,其中我显示UIPopover
视图。我想根据它在屏幕上的位置设置弹出窗口的背景。是否有可能获得UIPopover
相对于屏幕的确切位置?UIPopover在屏幕上获取确切位置
我有一个iPad应用程序,其中我显示UIPopover
视图。我想根据它在屏幕上的位置设置弹出窗口的背景。是否有可能获得UIPopover
相对于屏幕的确切位置?UIPopover在屏幕上获取确切位置
试试这个
if ([myPopOverController isPopoverVisible]) {
CGPoint myPopOverPosition = [myPopOverController.contentViewController.view
convertPoint:myPopOverController.contentViewController.view.frame.origin
toView:mainTopView];
//If you set toView to nil then it will consider as the window or you could specify as yourappDelegate.window
}