ios - presentViewController 隐藏 presentingViewController

标签 ios objective-c uiviewcontroller modalviewcontroller

有没有办法在 iOS 中呈现 ViewController,同时保持呈现的 ViewController 可见?现在,PresentingViewController 似乎在动画完成后就被隐藏了。

最佳答案

使用 UIModalPresentationStyle 中的值来控制它。

UIModalPresentationPageSheetUIModalPresentationFormSheet 将导致在下面留下一定量的 presenting View Controller 的演示文稿。

在正在呈现的 View Controller 上设置modalPresentationStyle

例如

presentedViewController.modalPresentationStyle = UIModalPresentationFormSheet;

[presentingViewController presentViewController:presentedViewController animated:YES completion:nil];

关于ios - presentViewController 隐藏 presentingViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20815400/

相关文章:

iphone - viewWillDisappear 和 viewDidDisappear 永远不会被调用

ios - 如何强制 iOS 设备通过陀螺仪确定其方向?

iOS 首次启动 View

ios - PassKit:切换到 Passbook 并选择 pass

iphone - UIWebView:跟踪屏幕更新(脏区)

iOS 从另一个类更新 ViewController UILabel

objective-c - 制作 UIBezierPath 的独立副本?

ios - 通过Testflight中的错误在同一版本下上传新构建

android - Phonegap 的 IDE 是什么? Eclipse 够用吗?

ios - 在 iOS 中,如何获取键盘信息以防止键盘覆盖文本字段?