Is there a way to use [self.view recursiveDescription] in Swift? I am trying to use this method but I am getting the following error:
'UIView' does not have a member named 'recursiveDescription'
Any suggestions?
Is there a way to use [self.view recursiveDescription] in Swift? I am trying to use this method but I am getting the following error:
'UIView' does not have a member named 'recursiveDescription'
Any suggestions?
In swift 2.0 you can simply run:
In (tested with iOS10 Beta3) swift 3.0 this is a bit more complex:
po let s = view.perform("recursiveDescription"); print(s)
In order to access private / undocumented Objective-C API (like the
-recursiveDescription
method onUIView
) from Swift you can do the following:UIView
).Declare the private method in the category header:
Now you can set a breakpoint and print out the recursive description in LLDB: