Swift segue not working?

后端 未结 6 1569
一个人的身影
一个人的身影 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条回答
  •  情深已故
    2021-01-14 10:45

    Generally, any UI updating has to be in main thread. I think the block for PFFacebookUtils.logInInBackgroundWithAccessToken is still in the background state in above situation. Maybe trigger the showViewController in dispatch_async(dispatch_get_main_queue(), {}) and see if there is any difference.

    dispatch_async(dispatch_get_main_queue(), {
        let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
        let vc = storyboard.instantiateViewControllerWithIdentifier("SignUpViewController")
        self.showViewController(vc, sender: self)
    })
    

提交回复
热议问题