Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created April 30, 2020 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azamsharp/717121842b94398d019aefead142be9e to your computer and use it in GitHub Desktop.
Save azamsharp/717121842b94398d019aefead142be9e to your computer and use it in GitHub Desktop.
struct ContentView: View {
@ObservedObject private var trackingListVM = TrackingListViewModel()
init() {
self.trackingListVM.getTrackingData()
}
var body: some View {
NavigationView {
List(self.trackingListVM.trackings, id: \.id) { tracking in
HStack {
Text(tracking.state)
.padding()
.foregroundColor(Color.white)
.background(Color.orange)
.clipShape(Circle())
.font(.custom("", size: 22))
Spacer()
// other code to display the remaining UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment