Skip to content

Instantly share code, notes, and snippets.

@rudifa
Last active June 15, 2018 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rudifa/10d93fdba16a963a0c8ffe309aedceb1 to your computer and use it in GitHub Desktop.
Save rudifa/10d93fdba16a963a0c8ffe309aedceb1 to your computer and use it in GitHub Desktop.
my_UIView.printSubviews()
import UIKit
extension UIView {
func printSubviews(indent: String = "") {
print("\(indent)\(self)")
let indent = indent + "| "
for sub in self.subviews {
sub.printSubviews(indent: indent)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment