wtfautolayout icon indicating copy to clipboard operation
wtfautolayout copied to clipboard

Custom naming of views

Open simonpac opened this issue 7 years ago • 1 comments

Instead of View1 or View2, it would be neat if we could change it to something easy to remember. Right now I have to write down the memory address of view1, launch the view debugger and cross reference the address from wtfautolayout to find out that view1 actually is CustomHeaderView. For a couple views its pretty easy, but gets difficult as more views are on the screen.

simonpac avatar Jul 26 '18 17:07 simonpac

Thanks a lot for raising this issue. Being able to edit view names would be a nice enhancement, and might fit well with #7.

It might also be useful to point out a few ways to see more meaningful names in the logs, which should then be displayed on wtfautolayout.com:

  • If the view is a custom subclass, you should see the name of its custom class. You should only see View1, View2 etc. for plain UIViews.
  • If the view has its accessibilityIdentifier set, you should see that identifier in the logs.

If you find it's not behaving that way, please share the input. Thanks a lot :)

johnpatrickmorgan avatar Jul 30 '18 21:07 johnpatrickmorgan