类表单单元格:UICollectionViewCell {
@IBOutlet weak var descriptionTF: UITextField!
@IBOutlet weak var SportTypeTF: UITextField!
@IBOutlet weak var WidthTF: UITextField!
@IBOutlet weak var CapacityTF: UITextField!
@IBOutlet weak var inORoutP: UIPickerView!
@IBOutlet weak var BackBT: UIButton!
@IBOutlet weak var StepTowBT: UIButton!
} 扩展名formcell2:UIPickerViewDelegate,UIPickerViewDataSource {
func numberOfComponents(in pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return InOrOutArray.count
}
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
let in = InOrOutArray[row]
}
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
return InOrOutArray[row]
}
}