I am building a Eureka form and would like to put a loop within the form to build a list of steppers based on an array.
The code I am trying to use is:
let itemNames = ["one","two","three"]
// Eureka From Set-up
form
+++ Section("Select item values")
for itemName in itemNames{
<<< StepperRow() {
$0.tag = itemName
$0.title = itemName
$0.value = 0
}
}
However, when I do this I get an error on the StepperRow line that says:
Unary operator cannot be separated from its operand
So it looks as though Swift no longer thinks it is within the form and is looking at the < symbol as less than, rather than the row declaration.
Any thoughts on how to get around this?