search

Home  >  Q&A  >  body text

objective-c - iOS开发 在模拟器视图看到一个View 有方法快速能在代码中找到在哪里定义的吗?

iOS开发 在模拟器视图看到一个View 有方法快速能在代码中找到在哪里定义的吗?

大家讲道理大家讲道理2892 days ago400

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-04-18 09:07:07

    If you want to know what View this is, if this is a custom view, then using Reveal, you can see the class name of the View class on the layer, and then you can know which one it is. Class.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:07:07

    Debug -> View Debugging -> Capture View Hierarchy

    Then as shown below, click to select the view you are interested in. On the left, you can see what type the view is, such as UIImageView. However, if the view is a custom view (such as CustomView), the view will be displayed. Customized class name (CustomView). Once you know the class name, you can just search the code by the class name.

    reply
    0
  • Cancelreply