View hierarchy debugger only shows views frame

472 views Asked by At

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

1

There are 1 answers

0
Edoardo Vicoli On

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!