Caps-iOS/CapCollector/Extensions/UIViewExtensions.swift
2018-08-16 11:18:27 +02:00

20 lines
388 B
Swift

//
// UIViewExtensions.swift
// CapFinder
//
// Created by User on 23.03.18.
// Copyright © 2018 User. All rights reserved.
//
import Foundation
import UIKit
extension UIView {
var recursiveSubviews: [UIView] {
var subviews = self.subviews.compactMap{ $0 }
subviews.forEach { subviews.append(contentsOf: $0.recursiveSubviews) }
return subviews
}
}