Last active
May 6, 2020 11:28
-
-
Save Dimillian/54be1804f28fb055d9f9b3f66eca1e0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var body: some View { | |
List { | |
SearchField(searchText: $viewModel.searchText) | |
ForEach(currentItems) { item in | |
NavigationLink(destination: ItemDetailView(item: item)) { | |
ItemRowView(displayMode: self.itemRowsDisplayMode, item: item) | |
} | |
} | |
} | |
.id(viewModel.sort) | |
.navigationBarTitle(Text(viewModel.category.label()), | |
displayMode: .inline) | |
.navigationBarItems(trailing: | |
HStack(spacing: 16) { | |
layoutButton | |
sortButton | |
}) | |
.actionSheet(isPresented: $showSortSheet, content: { self.sortSheet }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment