Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug view hierarchy does not render UI

Tags:

swift

xcode6

ios8

i'm trying to use the view hierarchy feature on xcode 6 to see the draggable layout of my app, but all i get is a blank area where it should be.

after trying out lots of suggestions from SO and other places, nothing works.

I have had the sim running with or without break points, different sim devices, different apps, but nothing works.

I know you're just supposed to click on the button while the app is being simulated and it's supposed to pop up, but when i do it the main interface with the button and options load along with all the elements in the debug navigator. just not the 3d UI itself.

thanks for any tips.

like image 259
stanley Avatar asked Oct 10 '14 04:10

stanley


Video Answer


3 Answers

You can click in that view and drag by holding down the left mouse button. This gives you the 3D view.

like image 109
zisoft Avatar answered Sep 20 '22 06:09

zisoft


It's not a fix, but when I had this issue I restarted Xcode and tried again a few more times it eventually worked for me.

like image 30
Liron Yahdav Avatar answered Sep 21 '22 06:09

Liron Yahdav


There seems to be a recent issue as well which I've run into. When I press the button, I get an assertion failure:

Assertion failure in -[UITextView _firstBaselineOffsetFromTop]

There's an OpenRadar here with a workaround which worked for me of attaching a "useless" constraint" in ViewController.m:

if ([NSLayoutConstraint respondsToSelector:@selector(activateConstraints:)]) {
    TEXTVIEWNAME.translatesAutoresizingMaskIntoConstraints = NO;
    [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[TEXTVIEWNAME]-|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(TEXTVIEWNAME)]];
}
like image 29
mackworth Avatar answered Sep 21 '22 06:09

mackworth