使用此代码;iPad UIPopover 出现在屏幕顶部,而不是在按下它的按钮上方 - 我知道 Apple 为此拒绝应用程序,所以有没有办法让它出现在按下的按钮上方?这是当前调用它的代码;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
self.popover = [[UIPopoverController alloc] initWithContentViewController:(UIViewController *)picker];
CGRect takePhotoRect;
takePhotoRect.origin = self.view.frame.origin;
takePhotoRect.size.width = 1;
takePhotoRect.size.height = 1;
[self.popover setPopoverContentSize:CGSizeMake(320.0, 216.0)];
[self.popover presentPopoverFromRect:takePhotoRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];