[swift] UIView에서 subview 찾기
UIView에서 하위의 subviews 찾아서 배열을 리턴
import UIKit
extension UIView
{
func findSubViews<T: UIView>(classOf: T.Type) -> [T] {
return recursiveSubviews.compactMap { $0 as? T }
}
var recursiveSubviews: [UIView] {
return subviews + subviews.flatMap { $0.recursiveSubviews }
}
}
-
Laravel 5 Failed opening required bootstrap/../vendor/autoload.php
-
[ios] @property의 속성 (strong, weak, copy) 사용 경우
-
[c] 한글 문자열 출력
-
[python][django] request.cookie 읽어오기 ㅋㅋㅋ (쓰기)
-
[linux] CentOS 에 APM 설치하기
-
[php] mysql_ 과 mysqli_ 의 차이
-
CentOS 에서 Cacti 설치하기
-
[ios] Xcode cannot run using the selected device
-
[swift] UIView에서 subview 찾기
-
인증서 *.p12 파일을 *.pem 파일로 변환
-
[iOS] Xcode 불필요한 캐시 삭제하기
-
[mac] 맥에서 기본 실행 앱 변경하기