在 UIModalPresentationFormSheet 的所有示例中,都使用了 presentModalViewController。但是,根据文档,presentModalViewController 已在 iOS 6.0 中弃用。但是我没有看到任何使用 pushViewController 显示 UIModalPresentationFormSheet 的示例。
我应该使用哪个?
最佳答案
首先,设置你的 Controller 的presentationStyle
controllerToBePresented.modalPresentationStyle = UIModalPresentationFormSheet;
然后
[self presentViewController:controllerToBePresented animated:YES completion:^{
}];
关于ios - 我应该为 iPad UIModalPresentationFormSheet 使用 pushViewController 还是 presentModalViewController?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21295668/