如何从函数中调用检查值
func pickerView(_ pickerView: AKPickerView, didSelectItem item: Int) {
let check = item
if (check == 0) {
let vc = self.storyboard?.instantiateViewController(withIdentifier: "sec1") as! quizViewController
self.navigationController?.pushViewController(vc, animated: true)
}
else if (check == 1) {
let vc = self.storyboard?.instantiateViewController(withIdentifier: "sec1") as! quizViewController
self.navigationController?.pushViewController(vc, animated: true)
}
else if (check == 2) {
let vc = self.storyboard?.instantiateViewController(withIdentifier: "sec1") as! quizViewController
self.navigationController?.pushViewController(vc, animated: true)
}
else {
let vc6 = self.storyboard?.instantiateViewController(withIdentifier: "wat") as! waterController
self.navigationController?.pushViewController(vc6, animated: true)
}
}
如何从函数中调用检查值