Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
Tags
- Xcode
- clean architecture
- claude code
- 클로드코드
- Observable
- UICollectionView
- tableView
- uiscrollview
- ios
- UITextView
- swiftUI
- Human interface guide
- Refactoring
- Clean Code
- 클린 코드
- collectionview
- Protocol
- HIG
- MVVM
- 리팩토링
- 애니메이션
- map
- RxCocoa
- SWIFT
- rxswift
- 스위프트
- combine
- uitableview
- swift documentation
- 리펙토링
Archives
- Today
- Total
김종권의 iOS 앱 개발 알아가기
[iOS - swift] PresentedViewController vs PresentingViewController 본문
iOS 기본 (swift)
[iOS - swift] PresentedViewController vs PresentingViewController
jake-kim 2020. 11. 8. 15:39viewController.presentingViewController vs viewController.presentedViewController

PresentingViewController
- '나'를 부르고 있는 viewController

PresentedViewController
- '내가' 부르고 있는 viewController

사용 예시
func dismiss(viewController: UIViewController) {
if presentedViewController === viewController {
dismiss(animated: true)
}
}
* 암기 방법: 시제의 '반대'
presented: 과거지만, 최근에 불려진 대상을 지칭
presenting: 미래지만, 불려진 대상을 지칭
'iOS 기본 (swift)' 카테고리의 다른 글
| [iOS - swift] 버튼의 상태 selected vs highlighted (0) | 2020.11.16 |
|---|---|
| [iOS - swift] textField델리게이트 함수 shouldChangeCharactersIn, range, NSRange (0) | 2020.11.08 |
| [iOS - swift] Singleton사용 방법 (0) | 2020.11.07 |
| [iOS - swift] for - in - where 문법 (0) | 2020.11.07 |
| [iOS - swift] ViewController의 presentation style / Transition Style (6) | 2020.11.01 |
Comments