我有一个popover,它来自代码:
CGPoint screenPoint = [self.mapView screenPoint: self.selectedObject.pointCoordinate];
CGRect rect = CGRectMake(screenPoint.x, screenPoint.y, 1, 1);
[self.detailViewPopover presentPopoverFromRect:rect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
正如你在屏幕截图中看到的那样 - 弹出窗口隐藏在状态栏中 - 是否可以从应该显示popover的区域中排除状态栏框架?
popover中视图的内容大小如下所示:
self.contentSizeForViewInPopover = CGSizeMake (320, self.view.frame.size.height - 100);
答案 0 :(得分:3)
您将UIPopoverArrowDirectionUp重置为UIPopoverArrowDirectionAny
[self.listViewPopover presentPopoverFromRect:rect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];