Contents

Develop
2022.12.09 15:38

[swift] UIView에서 subview 찾기

Views 2009 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

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 }

    }

}






?

  1. Laravel 5 Failed opening required bootstrap/../vendor/autoload.php

  2. [php] mysql_ 과 mysqli_ 의 차이

  3. [ios] Xcode cannot run using the selected device

  4. [ios] 카메라 사용 권한 확인해서 분기하는 방법

  5. [iOS] Xcode 불필요한 캐시 삭제하기

  6. [iOS] 시뮬레이터에 푸시 알림을 보내는 방법

  7. [ios] Objective-C 에서 자주 사용하는 수학 함수와 유용한 Define

  8. [android] 가속도 센서를 이용한 흔듦(Shake) 감지

  9. [swift] UIView에서 subview 찾기

  10. [ios] 웹뷰 history.back() ㅋㄷ

  11. [c#] mfc 기반의 웹서비스 서버/클라이언트 샘플과 예제 소스

  12. [c#] MS IE(Internet Explorer) 툴바 버튼 예제 2003/2005 두가지 버전

Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 ... 71 Next
/ 71