Debug view hierarchy does not render UI

亡梦爱人 提交于 2019-12-12 10:38:59

问题


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.


回答1:


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




回答2:


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.




回答3:


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)]];
}



回答4:


After clicking "Debug View Hierarchy" button, you are on the blank white screen.

Click on thread option depicted in below image, list will open, select any option from list, and again click on "Debug View Hierarchy" button. Screen will render.

This is what works for me.



来源:https://stackoverflow.com/questions/26292167/debug-view-hierarchy-does-not-render-ui

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!