Post

Replies

Boosts

Views

Activity

Had this error for days now and I can't fix it
struct ModelsByCategoryGrid: View { 2. @Binding var showBrowse: Bool 3. let models = Models()     4. var body: some View { 5.    VStack { ForEach(ModelCategory.allCases, id: \.self) { category in                    //Only display the grid if the category contains items 7.  if let modelsByCategory = models.get(category: category) {   8. HorizontalGrid(showbrowse: $showBrowse, title: category.label, items: modelsByCategory)         } I GET AN ERROR FOR LINE 5 SAYING "MISSING ARGUMENT FOR PARAMETER IN #1 CALL"
2
0
825
Mar ’22
I have 1 error I can't fix
var body: some View {      VStack {                ForEach(ModelCategory.allCases, id: .self) { category in [The error occurs for this ForEach command and it says: "Missing argument for parameter #1 in call"]                    //Only display the grid if the category contains items          if let modelsByCategory = models.get(category: category) {           HorizontalGrid(showbrowse: $showBrowse, title: category.label, items: modelsByCategory)          }        }      }   }
1
0
510
Mar ’22
I am having trouble fixing 3 errors
struct ModelsByCategoryGrid: View {   @Binding var showBrowse: Bool   let models = Models()       var body: some View {     VStack { [ONE ERROR HERE SAYS "Type'(_) -> ()' cannot conform to 'View']       ForEach(ModelCategory.allCases, id: .self); { category in [2 ERRORS HERE SAY 1: "Generic parameter 'Content' could not be inferred" 2: "Missing argument for parameter 'content' in call                   //Only display the grid if the category contains items         if let modelsByCategory = models.get(category: category) {           HorizontalGrid(showbrowse: $showBrowse, title: category.label, items: modelsByCategory)         }       }     }   } }
1
0
591
Mar ’22