Open baagod opened 5 years ago
目前只能选择一组:
init(values: Values, initialSelection: Index? = nil, action: Action?)
支持多组选中,这样做可行吗?:
init(values: Values, initialRows: [Int]? = nil, action: Action?) override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(true) if var initialRows = initialRows { // 截取超出的部分 if initialRows.count > values.count { initialRows = Array(initialRows[0..<values.count]) } initialRows.enumerated().forEach { (column, row) in if values[column].count > row { pickerView.selectRow(row, inComponent: column, animated: true) } } } }
能否添加这样的功能?
@hjzCy Please, translate into english!
@dillidon In other words, let the pickerView be able to select more than one.
目前只能选择一组:
支持多组选中,这样做可行吗?:
能否添加这样的功能?