Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/110.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS关闭上一个ViewController_Ios_Xcode_View_Uiviewcontroller_Dismiss - Fatal编程技术网

iOS关闭上一个ViewController

iOS关闭上一个ViewController,ios,xcode,view,uiviewcontroller,dismiss,Ios,Xcode,View,Uiviewcontroller,Dismiss,我将用以下代码演示一个新的ViewController UIStoryboard *storyboard = self.storyboard; finishViewController *finished = [storyboard instantiateViewControllerWithIdentifier:@"finishViewController"]; [self presentViewController:finished animated:YES completion:nil];

我将用以下代码演示一个新的ViewController

UIStoryboard *storyboard = self.storyboard;
finishViewController *finished = [storyboard instantiateViewControllerWithIdentifier:@"finishViewController"];
[self presentViewController:finished animated:YES completion:nil];

finishViewController时,上一个视图(上面代码处于打开状态的视图)仍在后台处理。有什么方法可以杀死它吗?

正在进行什么处理?你不能添加一个方法来停止处理吗?我可以,但是视图不再需要了,所以它在内存中没有任何意义。我认为这将是相当容易的…如果视图不在内存中,它在后台是如何工作的?发生的事情是显示新的视图,然后您刚刚使用的viewController仍在它后面处理。我将从内存中删除视图控制器。您是否遇到内存问题?