I am creating an Eureka form and would like to place a loop on the form to create a list of steppes based on an array.
The code I'm trying to use is:
let itemNames = ["one","two","three"]
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 in the StepperRow line, which reads:
Unary operator cannot be separated from its operand
So, it seems that Swift no longer thinks he is in shape and looks at the <character less than the line declaration.
Any thoughts on how to get around this?
source
share