gpt4 book ai didi

ios - modalPresentationStyle 在 iOS5 的模态视图中不起作用

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:20:14 26 4
gpt4 key购买 nike

我想在 iOS5 中使用 UIView 的 presentModalViewController 方法在 iPad 中显示一个弹出窗口。

即使我将 modalPresentationStyle 设置为 UIModalPresentationFormSheet,它也只显示为全帧大小。

我之前在iOS4中用过同样的代码,可以显示为弹窗。如何在 iOS5 中修复它?


DetailViewController *d = [[DetailViewController alloc] initWithNibName:nil bundle:nil];
self.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:d animated:YES];

谢谢。

最佳答案

你试过吗

d.modalPresentationStyle = UIModalPresentationFormSheet;

代替

self.modalPresentationStyle = UIModalPresentationFormSheet;

关于ios - modalPresentationStyle 在 iOS5 的模态视图中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8789790/

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