Post

Replies

Boosts

Views

Activity

Reply to Error with AppStorage (SwiftUI)
Sorry, I misspelled the code, actually it is @AppStorage ("num1") var num1: Int = 0 @AppStorage ("num2") var num2: Int = 0 var body: some View { VStack{ Button(action: { num1 += 1 }) { Image("+1") .resizable() } if num1 2 { num2 += 1 } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21