recursiveDescription method in Swift?

前端 未结 8 900
天命终不由人
天命终不由人 2020-12-23 09:50

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 hav         


        
8条回答
  •  生来不讨喜
    2020-12-23 10:30

    In swift 2.0 you can simply run:

    po view.performSelector("recursiveDescription")
    

    In (tested with iOS10 Beta3) swift 3.0 this is a bit more complex:

    po let s = view.perform("recursiveDescription"); print(s)

提交回复
热议问题