我如何在viewController中的类UICollectionViewCell之间传递数据

时间:2019-05-03 22:09:50

标签: ios swift

类表单单元格: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]
}

}

0 个答案:

没有答案