更新时间:2022-12-02 10:46:44
所以我想出了如何在iOS8中显示popover:
So I figured out how to show the popover in iOS8:
在iOS7.1中,我使用
In iOS7.1, I was controlling the size of the popover content using
// set content size
[popOverController setPopoverContentSize:CGSizeMake(SIZE_POPOVER_WIDTH, SIZE_POPOVER_HEIGHT)];
在iOS8中,我将此更改为设置弹出视图中嵌入的视图的内容大小setPreferredContentSize属性如下:
In iOS8, I changed this to setting the content size of the view embedded in the popover view using the setPreferredContentSize property as follows:
dropdownVC.preferredContentSize = CGSizeMake(SIZE_POPOVER_WIDTH, SIZE_POPOVER_HEIGHT);
进行此更改后,将显示具有正确计算高度的弹出窗口。
After making this change, the popover with the correct calculated height is being displayed.