0

好的,所以根据 Xcode,我的代码中没有错误。我以编程方式在视图之间切换,因为我想将页面切换链接到 uialertview 的结果,但是每当我切换视图时,它切换正常,然后当我返回主屏幕时,导航栏就会消失。

切换我正在使用的视图

InfoViewController *infoView = [self.storyboard instantiateViewControllerWithIdentifier:@"infoView"];
[self presentViewController:infoView animated:NO completion:NULL];

然后返回相同的代码但更改标识符。

4

2 回答 2

0

你可以试试segues

   [self performSegueWithIdentifier: @"SegueName" sender: self];

是教程。

于 2013-06-10T06:15:49.597 回答
0

使用 pop 移回上一个屏幕。现在您正在创建一个新实例并再次推送它[您说使用相同的代码移回]

[self.navigationController popViewControllerAnimated:YES];
于 2013-06-10T05:42:18.367 回答