简体   繁体   English

在导航控制器中重新选择视图控制器时,整个屏幕为空白

[英]When segueing back to view controller in navigation controller, entire screen is blank

Right now, I have a view controller that is embedded within a navigation controller and that has a collectionView in it. 现在,我有一个视图控制器,该视图控制器嵌入在导航控制器中,并且其中包含collectionView。 When the user presses a button, I segue to another view controller which works fine, but when that user wants to go back to the original view controller, I have a segue but the original view controller simply shows up blank. 当用户按下按钮时,我选择了另一个工作正常的视图控制器,但是当该用户想要返回到原始视图控制器时,我有一个选择,但是原始视图控制器只是显示为空白。 Please help! 请帮忙! I have attached my storyboard 我已经附上了故事板

在此处输入图片说明

为此,您应该退出segues,否则,当您想返回上一个视图时,只需将下面的代码行放入即可。

self.dismiss(animated: true, completion: nil)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用导航控制器在视图控制器之间进行隔离 - segueing between view controllers with navigation controller 在iOS上进行排序时将元素保留在Navigation Controller中 - Keep elements in Navigation Controller when segueing on iOS 在Swift中从文本字段中选择使用表视图的视图控制器时出现错误 - Error when segueing to view controller with Table View from Textfield in Swift 向后导航时导航控制器和视图未更新 - Navigation Controller and View not updating when navigating back 单击单元格并转到其他视图时应用程序崩溃 controller - app crashes when cell is clicked and segueing to a different view controller 将视图控制器导入另一个控制器进行segueing是否安全? - Is it safe to import a view controller to another controller for segueing? 在导航控制器中按下“后退”按钮时,是否可能不取消分配视图控制器? - is it possible to not dealloc a view controller when the back button is pressed in a navigation controller? 在没有导航控制器的情况下关闭以前的视图控制器的同时转到新的视图控制器:swift - Segueing to New View Controller while Dismissing previous without navigation controller: swift segueing到不同的视图控制器后动画停止 - Animation stops after segueing to different view controller 当我导航到包含ARSCNView的视图控制器时,出现空白屏幕 - When I navigate to the view controller containing ARSCNView a blank screen appears
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM