I'm configuring the picker with array values like this:
`row = FormRowDescriptor(tag: Static.picker, rowType: .Picker, title: "Value")
row.configuration[FormRowDescriptor.Configuration.Options] = array.count
row.configuration[FormRowDescriptor.Configuration.TitleFormatterClosure] = { value in
var stringArray = [String]()
for index in 0...self.array.count {
// append index with cast it to string
stringArray.append(String(index))
}
return stringArray
} as TitleFormatterClosure`
however I get an error
"Cannot convert return expression of type '[String]' to return type 'String!'" Why does this happen?
I'm configuring the picker with array values like this:
`row = FormRowDescriptor(tag: Static.picker, rowType: .Picker, title: "Value") row.configuration[FormRowDescriptor.Configuration.Options] = array.count row.configuration[FormRowDescriptor.Configuration.TitleFormatterClosure] = { value in
var stringArray = [String]() for index in 0...self.array.count { // append index with cast it to string stringArray.append(String(index)) } return stringArray } as TitleFormatterClosure`
however I get an error "Cannot convert return expression of type '[String]' to return type 'String!'" Why does this happen?