2019-10-11a few seconds read (About 43 words)How to find subview recursively in SwiftIssue #460 12345678910111213extension UIView { func findRecursively<T: UIView>(type: T.Type, match: (T) -> Bool) -> T? { for view in subviews { if let subview = view as? T, match(subview) { return subview } else { return view.findRecursively(type: type, match: match) } } return nil }}#swiftiOS