Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. func recursiveDescription(view: UIView, count: Int) {
  2. let subviews = view.subviews
  3.  
  4. if subviews.count == 0 {
  5. return
  6. }
  7.  
  8. var tabs = ""
  9. for i in 0..<count {
  10. tabs = tabs+"...."
  11. }
  12.  
  13. for subview in subviews {
  14. print("\(tabs)\(subview)")
  15. recursiveDescription(view: subview, count: count+1 )
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement