I am debugging my iOS app and since I have a view push/dismiss calls, I want to make sure I don't have any views in my stack that I wouldn't expect. Is it possible to see this in the Xcode debugger?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
You might find lldb comes to the rescue with 'recursiveDescription'. Simply set a breakpoint at the point where you are interested in the view hierarchy. If for example you want everything in the window you can type
Alternatively, I often find that when debugging views I am mostly interested in the hierarchy for a particular view. In that instance you can hook straight in to the point in code you are curious about (for example the viewDidAppear: method) and type:
Note: With Xcode 6 Apple have added realtime view debugging which you can access from the debug bar.
There is also Reveal.app which provide much more features than Xcode realtime view debugging, has a nicer UI and integrates with AppCode.
As all of your view controllers should be managed by the navigation controller, you should be able to do something like this:
Taken from here: How to iterate all the UIViewControllers on the app