简体   繁体   English

从嵌入式UICollectionView(在UIContainerView内部)导航到UIViewController

[英]Navigate from an embedded UICollectionView (inside a UIContainerView) to a UIViewController

I have a UICollectionView which is embedded into a UIContainerView. 我有一个UICollectionView嵌入到UIContainerView中。 So I want to navigate from this embedded UICollectionView to an independent (not embedded) UIViewController but it throws an error. 因此,我想从此嵌入式UICollectionView导航到一个独立的(非嵌入式)UIViewController,但会引发错误。 I know it should be pretty straightforward to use either a Segue or self.present etc. but in this situation it doesn't allow me to do it. 我知道使用Segue或self.present等应该非常简单,但是在这种情况下,我不允许这样做。 Embedded CollectionView looks like the dead end. 嵌入式CollectionView看起来像死胡同。 How can I navigate to a new UIViewController from an embedded CollectionView. 如何从嵌入式CollectionView导航到新的UIViewController。 Please see the image. 请看图片。 Thanks. 谢谢。 在此处输入图片说明

There is no such thing as navigating from a View to a View Controller. 没有从视图导航到视图控制器的事情。 It should be View Controller to View Controller. 它应该是View Controller到View Controller。 Don't try to take a segue from a View to a View Controller. 不要试图将视图从视图转移到视图控制器。 Try to take it from the View Controller which has that UICollectionView. 尝试从具有该UICollectionView的View Controller中获取它。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM