ortuman / SwiftForms

A small and lightweight library written in Swift that allows you to easily create forms.
MIT License
1.33k stars 209 forks source link

Picker format #187

Open corbrink opened 5 years ago

corbrink commented 5 years ago

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?