애플 개발자 문서에서 SwiftUI Tutorial 을 시작하기 전에 정리해놓은 SwftUI의 개요 4가지
- Declarative syntax—Define which views appear onscreen using simple Swift structures.
Flutter, React 와 같이 최근 프론트엔드 프레임워크들 사이에서 자주 채용되는 방식인 '선언적 구문'을 통한 프로그래밍
A compositional API—Quickly create and iterate your user interface using built-in views and modifiers. Compose more complex views by combining simpler views.
compositional 이란 단어의 의미가 한국말로 바꿔 이해하기 어려운 부분이 있지만 최대한 풀어보자면 구성 요소들을 조합함으로써 view를 구현하는 메커니즘을 의미하는 것 같다. 간단한 view들을 결합하여 좀 더 복잡한 상위의 view를 만들어가는 메커니즘
A powerful layout system—Easily arrange views onscreen relative to their parent views and to each other. When existing views and controls don’t suit your needs, you can draw your own.
Flutter에서 위젯을 그릴 때는 기본적으로 부모의 위젯의 Constraint와 자식 위젯의 Size가 충돌할 때 이를 어떻게 조율할 것인가에 대한 가이드가 있다. SwiftUI는 어떤 layout system일지 두근두근..
Views that reflect app data—Define a view’s data dependencies, and SwiftUI automatically updates the view when data changes, avoiding errors from invalid view states.
View 와 데이터(Model)의 관계를 어떻게 구현할 것인가가 프론트 작업의 핵심.. 개요에서는 automatically update 한다고 하는데 데이터 바인딩을 통해 자동으로 리렌더링되는게 기본 방식일까..? Flutter는 상태관리 혹은 setState로 리렌덩링 요청 따로 해야 하는뎁..
Automatic accessibility support—SwiftUI adds basic accessibility that you’ll learn to enhance with minimal effort.
선언형 프로그래밍은 뭐니뭐니해도 완만한 학습 곡선과 생산성이 좋다는게..
'iOS > SwiftUI Tutorial' 카테고리의 다른 글
SwiftUI Tutorial 5- Drawing paths and shapes (0) | 2024.07.07 |
---|---|
SwiftUI Tutorial 4 - Handling user input (0) | 2024.07.06 |
SwiftUI Tutorial 3 - Building lists and navigation (0) | 2024.07.05 |
SwiftUI Tutorial 2 - Creating and combining views 2 (0) | 2024.07.04 |
SwiftUI Tutorial 2 - Creating and combining views 1 (0) | 2024.07.03 |