Swift segue not working?

后端 未结 6 1555
一个人的身影
一个人的身影 2021-01-14 09:50

My Swift segue is not working at all and isn\'t throwing any errors. The breakpoint shows me that the app lands on this line but nothing happens:

self.perfor         


        
6条回答
  •  旧时难觅i
    2021-01-14 10:22

    Swift 3 solved:

        override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
                if (segue.identifier == "SignupSegue") {
                    DispatchQueue.main.async {
                        let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
                        let vc = storyboard.instantiateViewController(withIdentifier: "SignUpViewController")
                        self.show(vc, sender: self) 
                    }
              }
        }
    

提交回复
热议问题