structures1 SwiftUI) "@State"로 구조체의 프로퍼티를 변경하기 (feat. 프로퍼티 래퍼; Property Wrappers) 목차 개념 @State를 왜 쓰는가? 구조체 안에서 프로퍼티 값을 변경하기 위해 struct 기반의 SwiftUI에서 인스턴스는 immutable 하기 때문에 @State 이전 @State 이후 정의 A property wrapper type that can read and write a value managed by SwiftUI. SwiftUI에 의해 관리되는 값을 읽고 쓸 수 있게 가능하는 프로퍼티 래퍼의 타입 중 하나 State | Apple Developer Documentation 프로퍼티 래퍼(Property Wrapper)? 프로퍼티를 감싸는 "포장지" A property wrapper adds a layer of separation between code that manages how a.. 2023. 11. 14. 이전 1 다음 반응형