简体   繁体   English

在View Debugger中查看它时,如何找到连接到任何UIView的相应插座?

[英]How to find respective outlet connected to any UIView while viewing it in View Debugger?

So i am going through this really old code of Swift 2 and i am fixing bugs in a certain module. 因此,我正在研究Swift 2的这个非常古老的代码,并且正在修复某个模块中的错误。

Now this module has a UITableView Cell and the person that worked on it has used Autoresizing on 10 labels inside the UITableViewCell.xib file and they are layed out randomly overalapped on each other. 现在,此模块具有一个UITableView Cell,并且处理该模块的人员已对UITableViewCell.xib文件中的10个标签使用了自动调整大小,并且它们彼此之间随机重叠。 (yeah, big pain in the neck !) (是的,脖子很疼!)

Now, the frame of all the labels is being set out programatically, so I have no idea which frame is being set out for which label. 现在,所有标签的框架都以编程方式设置,因此我不知道为哪个标签设置了哪个框架。

And the outlets of all the labels are not even named properly so i dont know which label contains the date, which contains the title, which contains the url and so on.Their outlets are named like label1,label2...label10. 而且所有标签的出口都没有正确命名,所以我不知道哪个标签包含日期,哪个包含标题,哪个包含url等等。它们的出口被命名为label1,label2 ... label10。

My question is that, when i debug the view how do i found out the outlet which is connected to a specific label ? 我的问题是,当我调试视图时,如何找到连接到特定标签的插座?

Hope anybody cud help ? 希望有人帮忙吗?

打开tableView Cell的xib文件,然后在Xcode的右上方有两个互相拥抱的圆圈,当您将其悬停时,工具提示将显示“ Show the Assistant Editor”,然后单击它,这样您就可以看到tableVieCell类和xib文件,将鼠标悬停在班级的每个出口灰色圆圈上(我的意思是,该圆圈显示在每个代码行的编号之间),因此xib文件中的相关标签将亮起

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

相关问题 如何将 animation 连接到 View? Animation 忽略出口和 UIView 尺寸 - How to connect animation to View? Animation ignores outlet and UIView size 使用父视图管理另一个UIView出口 - Managing another UIView outlet with parent view iOS设备连接到附件时如何使用Xcode调试器? - How to use Xcode debugger while iOS device is connected to an accessory? 如何使用以IBOutlet连接的UIView作为表格视图节标题? - How to use UIView connected as IBOutlet as table view section headers? 子类中的UIView作为@IBOutlet,而超类中的UIView是实例属性,而不是插座 - UIView inside subclass as an @IBOutlet while in superclass being instance property, not an outlet 插座已连接,但在展开可选值时意外发现为零 - Outlet is connected, but Unexpectedly found nil while unwrapping an Optional value 为什么Swift uiview无法连接到View Controller? - Why would swift uiview not be connected to view controller? NSLayoutConstraint,在表视图单元格中子视图UIView不起作用 - NSLayoutConstraint, sub-viewing a UIView in a table view cell not working 来自插座的自定义UIView - Custom UIView from outlet 如何在没有任何延迟的情况下将UIView作为子视图添加到Storyboard的视图? - How to add an UIView as a subview to Storyboard's view without any delay?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM