简体   繁体   English

是否可以在Swift上检测到与特定View Controller相关联的所有segue?

[英]Is it possible to detect all segues that are associated to a particular View Controller on Swift?

I would like to detect the segues that are associated to a particular View Controller on any of its elements but I cannot find any information about how to control it. 我想在其任何元素上检测与特定View Controller相关联的segue,但找不到任何有关如何控制它的信息。

I know that I can make reference to a segue with an identifier but I would like to know all the ID 's of each segue that are associated to the elements of a particular View Controller . 我知道我可以使用标识符来引用一个序列,但是我想知道与特定View Controller的元素相关联的每个序列的所有ID

Is that possible? 那可能吗?

Thanks in advance! 提前致谢!

I don't know if this is helpful, but if the issue is trying to figure out something in the view hierarchy, I've used this link : 我不知道这是否有帮助,但是如果问题是试图找出视图层次结构中的某些内容,则使用此链接:

Recursive Description Method 递归描述方法

Basically, add a breakpoint to your code in the area you want to figure out the view hierarchy then use this command in the lldb debug console : 基本上,在要确定视图层次的区域中的代码中添加断点,然后在lldb调试控制台中使用以下命令:

expr -l objc++ -O -- [UIViewController _printHierarchy]

暂无
暂无

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

相关问题 Swift 3-仅在视图控制器内部隔离集合视图的界面 - Swift 3 - Interface That Only Segues A Collection View Inside Of A View Controller 我怎样才能 go 到另一个视图 controller 没有segues [SWIFT 5] - How can I go to another view controller without segues [ SWIFT 5] 如何从一个视图控制器以编程方式关闭所有转场 - How to programmatically close all segues from one view controller 多个segues到同一个视图控制器 - multiple segues to the same view controller 斯威夫特:即使对新控制器提出了要求,也可以使子视图控制器保持在原位? - Swift: Make child view controller stay in place even WITH segues to new controller? 如何在没有任何推送请求的情况下迅速从另一个View Controller访问方法? - How can I access a method from another View Controller in swift without any push segues? 使用segues时,将数据传递给初始化初始化程序之前的视图控制器。 (迅速) - Pass data to view controller before initializer when using segues. (Swift) 在Swift中的其他View Controller上显示特定用户及其解析存储的所有信息 - Display a particular user and all their information stored on parse on a different View Controller in Swift 您是否在同一prepareForSegue方法中为一个视图控制器的所有segue实现行为? - Do you implement behaviour for all the segues of one view controller in the same prepareForSegue method? 从搜索到显示/呈现视图控制器 - From segues to show/present view controller
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM