How to find the UI element connected to a specific IBOutlet?

狂风中的少年 提交于 2019-12-20 01:12:00

问题


Is there any way to find which UI element an IBOutlet declared in code is connected to?


回答1:


Go to your view controller file where you have declared IBOutlet (.h or .m). Then you can see left side of each variable declaration there is a dark grey round image. (It is filled if you have connected that IBOutlet with Storyboard/Xib unless it is unfilled.)

By clicking that image you can see small popover which shows connection of outlet. See below image will show you.



来源:https://stackoverflow.com/questions/27056812/how-to-find-the-ui-element-connected-to-a-specific-iboutlet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!