| | |
| | | @IBOutlet weak var pickerView: UIPickerView! |
| | | |
| | | @IBOutlet weak var pickviewTwo: UIPickerView! |
| | | private var clickClouse:(((Int,String))->Void)! |
| | | private var clickClouse:(((Int,String,String))->Void)! |
| | | private var disposeBag = DisposeBag() |
| | | private var years = [Int]() |
| | | var dataSoure : [String :[Any]] = [:] |
| | |
| | | print(dataSoure); |
| | | } |
| | | |
| | | static func show(clickClouse:@escaping ((Int,String))->Void){ |
| | | static func show(clickClouse:@escaping ((Int,String,String))->Void){ |
| | | let studentChooseView = CommonYearsPickerView.jq_loadNibView() |
| | | studentChooseView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | studentChooseView.clickClouse = clickClouse |
| | |
| | | @IBAction func completeAction(_ sender: UIButton) { |
| | | let index = pickerView.selectedRow(inComponent: 1) |
| | | var str = "" |
| | | var name = "" |
| | | if selectIndex == 1 { |
| | | if let dict = dataSoure[titleArr[selectIndex]]?[index] as? Dictionary<String, String> { |
| | | str = "\(dict.values.first ?? "")" |
| | | name = "\(dict.keys.first ?? "")" |
| | | } |
| | | |
| | | }else{ |
| | | str = "\(dataSoure[titleArr[selectIndex]]?[index] ?? "")" |
| | | name = str; |
| | | } |
| | | |
| | | clickClouse((selectIndex,str)) |
| | | clickClouse((selectIndex,str,name)) |
| | | closeAction() |
| | | } |
| | | } |