I have a string - "productRaw" which I am splitting up to show in separate sectionData cells, whilst under the same "Item 1" cellData table view. This is the code I am using to split up the String and add each separate part to a separate sectionData cell.
Where I am declaring the individual cells I want to be shown for the first section - "Item 1", when I only use [productName] in my sectionData then this compiles without any issues.
However when I also add , [listingPrice], [briefDescription], [productURL], [activeUntil] to my sectionData I receive the following error for the [cellData(opened: syntax.
Code Block let group_array = document["product"] as? [String] ?? [""] let productName1 = group_array.first ?? "No data to display :(" let productRaw = "\(productName1)" let componentsRaw = productRaw.components(separatedBy: ", ") var product = [String: String]() for component in componentsRaw { let keyVal = component.components(separatedBy: ": ") product[keyVal[0]] = keyVal[1] } if let productName = product["Product Name"], let listingPrice = product["Listing Price"], let briefDescription = product["A brief description"], let productURL = product["Product URL"], let activeUntil = product["Listing active until"] { self.tableViewData = [cellData(opened: false, title: "Item 1", sectionData: [productName], [listingPrice], [briefDescription], [productURL], [activeUntil])] }
Where I am declaring the individual cells I want to be shown for the first section - "Item 1", when I only use [productName] in my sectionData then this compiles without any issues.
However when I also add , [listingPrice], [briefDescription], [productURL], [activeUntil] to my sectionData I receive the following error for the [cellData(opened: syntax.
So my question is, why am I receiving the above error and what can I do to resolve it?Extra arguments at positions #4, #5, #6, #7 in call
It depends on many things,So my question is, why am I receiving the above error and what can I do to resolve it?
How tableViewData is declared and used
How cellData(opened:title:sectionData) is defined
Code Block self.tableViewData = [cellData(opened: false, title: "Item 1", sectionData: [productName, listingPrice, briefDescription, productURL, activeUntil])]
If this is not what you want, you may need to show more info.