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 |
Tags
- navigationsplitview
- test
- SWIFTUI
- concurrency
- iOS 개발자
- iOS 13.0+
- xcode
- 모바일
- ObjC
- tuist #xcodecloud #ios #ci/cd #swiftlint #firebase
- UI
- Git
- SWIFT
- composablearchitecture
- xcodecloud
- Alamofire
- regex
- combine
- Firebase
- swiftdata
- 개발
- github
- IOS
- ios18
- Tuist
- Navigation
- uikit
- 정규표현식
- network
- TCA
Archives
- Today
- Total
iOS 개발 기록
Coordinator Pattern 본문
728x90
Coordinator Pattern
Date: 2022년 12월 5일
Tags: 화면전환
📄 목차
Coordinator란?
- 하나 이상의 ViewController에 지시를 내리는 객체.
- ViewController간에 서로 이동할 때에 push, present 등 화면 전환을 Coordinator 클래스로 분리해 관리.
- ViewController들이 서로 분리되어 쉽게 재사용할 수 있음.
특징
- Coordinator 별로 하나 이상의 ViewController을 보유한다.
- 각 Coordinator은 일반적으로 start라고 불리는 메서드로 ViewController을 표시한다.
- 각 ViewController에는 Coordinator에 대한 delegate가 있다.
- 각 Coordinator에는 child coordinator 배열을 가지고 있다.
- 각 Coordinator에는 parent coordinator에 대한 delegate reference가 있다.
단점
- 뷰를 만들때 마다 Coordinator 매커니즘을 작성해야 한다.
- Delegate 패턴 때문에 아주 많은 양의 보일러 플레이트 코드가 존재.
sample project
참고
Coordinator
간단한 예제로 살펴보는 iOS Design/Architecture Pattern: Coordinator - Basic
실무예제
Coordinator + Combine framework
Coordinator Pattern using Apple Combine Framework
Implement Coordinator Design Pattern Using Combine
관련 라이브러리
'Architecture, Design Pattern' 카테고리의 다른 글
Clean Architecture (0) | 2022.07.14 |
---|---|
Clean Architecture - SOLID 원칙 (0) | 2022.07.14 |
MVC, MVVM (0) | 2022.05.31 |