gpt4 book ai didi

iphone - 用 modalview 调用 navigationcontroller?

转载 作者:行者123 更新时间:2023-11-28 19:24:21 26 4
gpt4 key购买 nike

我有一个问题,我做了这个:

Impostazioni *impostazioni=[[Impostazioni alloc] initWithNibName:@"Impostazioni" bundle:nil]; 
[self.navigationController presentModalViewController:aiuto animated:YES];

但我想在这种模式下保留导航栏:

[self.navigationController pushViewController:aiuto animated:YES];
[self.navigationController.navigationBar.backItem setTitle:@"iCalory"];

我想使用 presentModalView 我该怎么做?谢谢

最佳答案

要在您的代码中添加导航 Controller ,

 Impostazioni *impostazioni=[[Impostazioni alloc] initWithNibName:@"Impostazioni" bundle:nil]; 

UINavigationController *navigationController = [[[UINavigationController alloc] initWithRootViewController: impostazioni] autorelease];

[self.navigationController presentModalViewController:navigationController animated:YES];

关于iphone - 用 modalview 调用 navigationcontroller?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5357557/

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