我如何从函数中调用检查值

时间:2018-08-20 12:51:29

标签: ios swift

如何从函数中调用检查值

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)
    }
}

如何从函数中调用检查值

0 个答案:

没有答案