
Data Flow
·
iOS/SwiftUI
State : 값이 변하면 View를 새로 그려주는 역할을 수행 State 란 무엇인가? 1. State Property store values that the view depends on ⇒ 뷰가 의존하는 상태 속성 저장값 2. State Property represent values that can change ⇒ State Property는 변경할 수 있는 값을 나타냅니다. 3. State Property typically declared in the view that nedds them ⇒ State Property는 일반적으로 이를 추가하는 뷰에서 선언됩니다. 예제 코드 State 속성을 사용한 toggleValue 의 변화에 따라 Text가 변하는걸 볼수 있다 Binding : State의 값..