How to get the 3D view of UI in Xcode 6?

2019-01-13 13:32发布

问题:

I am a newbie in this field of development. I started using Xcode 6 after using Xcode 5.1.1 for a week.

After getting fascinated with newly added features, I installed Xcode 6.

Now, I am not able to find this 3D view of UI in ios.

I am using OSX 10.9.4.

回答1:

  1. Run the app. View Debugging works in the simulator and on devices, but it's important to note that it needs to be an iOS 8 simulator or device. That said, you may allow earlier deployment targets in your project, just make sure you run on iOS 8 when you try View Debugging.

  2. Navigate to the screen/view that you want to inspect within the running app.

  3. In the Navigators Panel (left column), select the Debug Navigator (sixth tab). Next to your process, you'll see two buttons – press the rightmost button and select View UI Hierarchy.

Alternatively, use the menu:

  1. Xcode will stop your app and lets you inspect your views. There's no need for you to set a breakpoint, Xcode will do that for you. However, if you want to set a breakpoint manually to inspect local variables etc. alongside your views, you can set a normal breakpoint and once the app pauses, press the View Debugging button in the Debug Area (bottom panel):



回答2:

Xcode6.0.1 View Debugging only can be used on iOS8 and 32-bit device .I do not know if this is a bug.



回答3:

Do you mean View Debugging?

If so:

  1. Run the app in the simulator
  2. At the point you want the 3D view select (in Xcode) Debug->View Debugging->Capture View Hierarchy


回答4:

For view debugging in Xcode 6 add a breakpoint that you want to debug.

When the app stops you can press this button...

And Xcode will enter view debugging on the current screen.

The app needs to be paused on a breakpoint though.



回答5:

First, you need see your phone view in the debug view, if not do as @hagi told.

Second, click(hold) one component of the view and drag, then you'll find it out.

Here is a video, give it a try. http://www.youtube.com/watch?v=KUjbhGOV7DM from(http://natashatherobot.com/xcode-6-debug-view-hierarchy-storyboard/)



回答6:

In my case it was working on iPhone 5S (or less) simulator, but not on iPhone 6 (all on iOS8) But I was supporting iPhone 6 with the correct Launch Screen.xib



回答7:

Worth noting for this problem is that if you're running a 64bit device, your target needs to be configured so that arm64 is in both your Architectures and Valid Architectures build settings.

If you don't have that, you can debug your views on a 32 bit device, but not 64.