1

I have a very big problem with View hierarchy debugger in Xcode. This is my only project in which I have this behavior. When I capture the view hierarchy I only see frames and anything else. I already tried the "Adjust view mode" setting, but with no results. It is set on "Wireframes and Contents", but I can't see contents... My project is built with only one storyboard (Main.storyboard) which houses the UINavigationController and the initial view controller of the app. The rest is built with programmatic layout. Didn't find nothing on internet. Do you have any solution? Only system images (SFSymbols) appear.

enter image description here

Edoardo Vicoli
  • 227
  • 2
  • 8
  • Do you have "show constraints" feature enabled? If yes, try disable it and check again. – Mikhail Vasilev Dec 06 '20 at 14:12
  • No, it is disabled – Edoardo Vicoli Dec 06 '20 at 14:18
  • This is certainly annoying, and you should report it as a bug to Apple, but I don't see how it prevents you from using the view debugger effectively, since all the important info is provided by the wireframes, the hierarchy on the left, and the inspectors on the right. You don't really _need_ to see a drawing of the view contents. – matt Dec 06 '20 at 17:31
  • Sure, I know. But since this is my only project with which this behavior occurs, I'd like to understand why. – Edoardo Vicoli Dec 06 '20 at 20:40

1 Answers1

0

After more than a year, I decided to try again to solve this problem. I finally solved it! With the latest Xcode releases, when I start the view hierarchy debug tool, an error appears and something is logged in the console. I use a subclass of CAGradientLayer in this screen and a fatal error occurs because I have not implemented the init(layer:) initializer.

I have solved my issue by implementing the method. Now everything works fine!

Edoardo Vicoli
  • 227
  • 2
  • 8