对于iOS上的此选择器库Busta117/SBPickerSelector,如何为.text
种类numberOfComponents = 2
设置默认值?
我目前正在展示它:
let picker = SBPickerSelector()
picker.delegate = self
picker.numberOfComponents = 2
picker.pickerType = .text
picker.pickerData = [["3", "4", "5", "6", "7", "8", "9", "10"],
Array(repeating: "", count: 13).enumerated().map{"\($0.0) in"}]
picker.pickerId = "height"
picker.doneButtonTitle = "Done"
picker.cancelButtonTitle = "Cancel"
picker.showPickerOver(self)
答案 0 :(得分:0)
picker.pickerView
包含UIPickerView
,您可以:
picker.pickerView.selectRow(<row: Int>, inComponent: Int>, animated: Bool)