任何人都知道如何在iOS 8的新UIPopoverPresentationController
显示时移动它?这是我用来创建它的代码:
UIViewController *viewControllerForPopover = [[UIViewController alloc] init];
viewControllerForPopover.view = myView;
viewControllerForPopover.modalPresentationStyle = UIModalPresentationPopover;
viewControllerForPopover.preferredContentSize = myView.frame.size;
[self presentViewController:viewControllerForPopover animated:YES completion:nil];
myPopoverController = [viewControllerForPopover popoverPresentationController];
myPopoverController.permittedArrowDirections = UIPopoverArrowDirectionDown;
myPopoverController.sourceView = self.view;
myPopoverController.backgroundColor = [UIColor lightGrayColor];
rect = CGRectMake(10, 10, 10, 10);
myPopoverController.sourceRect = rect;
但是现在如何在仍然显示时移动它?使用旧UIPopoverController
我刚调用presentPopoverFromRect
将控制器移动到新坐标,但我无法找到UIPopoverPresentationController
的解决方案。有什么想法吗?