recursiveDescription method in Swift?
问题 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? 回答1: In order to access private / undocumented Objective-C API (like the -recursiveDescription method on UIView ) from Swift you can do the following: Create a new Objective-C category on the class the private method is defined in (e.g. UIView ). Hit Yes if Xcode asks you about