作为模态弹出窗口的视图高度 - Swift

Height of view as a modal popup - Swift

在我使用 XCode 创建的应用程序中,我创建了一个以模式弹出窗口形式打开的视图。我使用了这段代码:

@IBAction func open_view(_ sender: Any) {
    let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
    let VC_test_object = storyBoard.instantiateViewController(withIdentifier: "VC_Test")
    VC_test_object.modalPresentationStyle = .popover;
    self.present(VC_test_object, animated: true, completion: nil)
}

VC_Test 是 Storyboard 中的 ViewController。这是结果:

但是,我想管理视图的高度以创建一种菜单。 如本示例屏幕截图(来自文档应用程序)所示:

我看不懂怎么做。

你能告诉我如何管理弹出窗口的高度吗?

感谢您的帮助。

对于自己编写代码的版本,此 SO link 及其下面的答案是您所需要的:

但是,我宁愿使用这个第三方库:Presentr