gpt4 book ai didi

iphone - 在 iPad 应用程序的中心使用导航 Controller 打开模态视图

转载 作者:行者123 更新时间:2023-12-03 20:25:35 24 4
gpt4 key购买 nike

我正在尝试在 iPad 应用程序的中心打开一个模态视图 Controller 。

这就是我在代码中所做的

Settings_iPad *vController = [[Settings_iPad alloc]
initWithNibName:@"Settings_iPad" bundle:nil];

vController.modalPresentationStyle = UIModalPresentationFormSheet;

// Create a Navigation controller
UINavigationController *navController = [[UINavigationController alloc]
initWithRootViewController:vController];

// show the navigation controller modally
[self presentModalViewController:navController animated:YES];

// Clean up resources
[navController release];
[vController release];

这就是我得到的http://www.use.com/48bcd41a28a13b562140

怎样才能很好地打开这个窗口,并且窗口中心的尺寸较小。

谢谢

最佳答案

将导航 Controller 上的modalPresentationStyle设置为UIModalPresentationFormSheet并以模态方式呈现。

navigationController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:navigationController animated:YES];

关于iphone - 在 iPad 应用程序的中心使用导航 Controller 打开模态视图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8565961/

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