Does the Debug View Hierarchy in Xcode allow me to see what view controller owns a view?
Update: Starting with Xcode 9, view controllers are listed right along the view hierarchy in the visual debugger.
You can get the memory address of the selected view from the inspector in Xcode and then use the console to get the view's view controller using -nextResponder
.
http://developer.apple.com/library/ios/documentation/uikit/reference/UIResponder_Class/Reference/Reference.html#//apple_ref/occ/instm/UIResponder/nextResponder
UIView implements this method by returning the UIViewController object that manages it (if it has one) or its superview (if it doesn’t)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With