1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[SwiftUI]@Stateとは

Posted at

#@Stateの役割
・selfのプロパティを変更できるようにする
→ SwiftUIでのViewはstructであり保持するプロパティを変更することができないが、@stateを付与することで変更可能に
・そもそも@StateとはPropertyWrapperである

PropertyWrapperとは?

プロパティラッパーとは、プロパティの値の保存方法や計算方法をプロパティラッパーとして定義し、同じ方法を適用できるプロパティを、そのプロパティラッパーでラップすることで開発の効率化を図るというもの

https://rakusui.org/swift_property_wrapper/

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?