mikechan1234 / SwiftUI-StateObject-Example

Showing the difference between ObservedObject and StateObject in SwiftUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftUI-StateObject-Example

Xcode Version 12.0 beta (12A6159)

This demonstrates the usage of StateObject v ObservedObject Property Wrapper.

Just comment out the StateObject/ObservedObject to use the other and tap on the steppers to see the result on the label.

About

Showing the difference between ObservedObject and StateObject in SwiftUI


Languages

Language:Swift 100.0%