gpt4 book ai didi

ios - 在不覆盖 iPhone 上的当前 View 的情况下呈现模态视图 Controller

转载 作者:技术小花猫 更新时间:2023-10-29 11:18:50 25 4
gpt4 key购买 nike

enter image description here

我一直在尝试添加 View 容器,并在两侧留出 20 像素的空间。但这似乎不是正确的做法......

// ADD CHILD VIEW CONTROLLER
[parentViewController addChildViewController:childViewController];
[parentViewController.view addSubview:childViewController.view];
[childViewController didMoveToParentViewController:parentViewController];

// REMOVE THE CHILD VIEW CONTROLLER
[childViewController willMoveToParentViewController:nil];
[childViewController view] removeFromSuperview];
[childViewController removeFromParentViewController];

更新我已经通过使用这个 MZFormSheetController“https://github.com/m1entus/MZFormSheetController”表单演示和很酷的 View 转换来解决这个问题。

最佳答案

使用 MZFormSheetController "https://github.com/m1entus/MZFormSheetController "表单演示, View 转换很酷。或者,iOS 8 及更高版本,您可以使用 viewController.modalPresentationStyle = UIModalPresentationOverCurrentContext;祝你好运,如果你想要完整的片段,请告诉我......

关于ios - 在不覆盖 iPhone 上的当前 View 的情况下呈现模态视图 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20390326/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com