Skip to content

Instantly share code, notes, and snippets.

@carson-katri
Last active July 26, 2019 16:45
Show Gist options
  • Save carson-katri/6ebb3a133f202a121ae9b26f537ebf50 to your computer and use it in GitHub Desktop.
Save carson-katri/6ebb3a133f202a121ae9b26f537ebf50 to your computer and use it in GitHub Desktop.
List in SwiftUI
List(todos, id: \.id) { todo in
HStack {
Image(systemName: "checkmark.circle\(todo.completed ? ".fill" : "")")
Text(todo.title)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment