https://developer.apple.com/documentation/uikit/uiview/1622541-bringsubviewtofront
Apple Developer Documentation
developer.apple.com
쓰다보면 항상 헷갈려서 검색하게되어 글을 남겨본다
swift로 앱을 만들다보면 하나의 부모뷰에 여러 자식들이 들어가게 되는데
겹쳐있는 자식들중 하나를 맨앞으로 끌어오고싶을때 쓰는 메소드이다.
쓰는 방법은
부모뷰.bringSubviewToFront(맨앞으로 당길 자식뷰)
ex: https://www.hackingwithswift.com/example-code/uikit/how-to-bring-a-subview-to-the-front-of-a-uiview )
parentView.bringSubviewToFront(childView)
다음엔 잊지않기를 바란다
반응형
'iOS > swift' 카테고리의 다른 글
Block Based KVO, iOS - contentSize (0) | 2022.09.27 |
---|---|
Date 끼리의 비교 (0) | 2022.08.04 |
error, building for iOS Simulator, but linking in object file built for iOS, ~ for architecture arm64 (1) | 2022.06.29 |
네비게이션의 스와이프 백제스쳐가 동작하지 않는다. (0) | 2022.05.19 |
Xcode를 버전별로 관리하자 (0) | 2022.05.19 |