Post

Replies

Boosts

Views

Activity

Switch Statements in SwiftUI
  switch score  {                    case 0: Image("gameboard0")                    case 1: Image("gameboard1") I am using a switch statement but here is the question. Can I say something like case 0 25 49? I am creating a board game and I would like the same picture to show when the user score is either 0, 25, or 49. Thanks. I am sure this is fairly simple but every time I try to use an "or" statement the app crashes.
2
0
3.9k
Jan ’21