[英]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.