我有一个标签视图控制器,其中有一个按钮,如下所示,当按下它时会出现一个模态窗口:
PostViewController *post = [[PostViewController alloc] init];
// [self.navigationController pushViewController:post animated:YES];
// Presentation
[self presentViewController:post animated:YES completion:nil];
当模态框完成时,我想要关闭它并推出一个新的视图控制器,代码如下:
ProfilesViewController *profile = [[ProfilesViewController alloc] init];
[self.navigationController pushViewController:profile animated:YES];
但是作为一个模态框,我不能在帖子VC中这样做。 我该怎么做?