Swift performSegueWithIdentifier not working

后端 未结 8 1517
礼貌的吻别
礼貌的吻别 2020-12-01 04:13

I am trying to switch view controllers after a user successfully logs in to their account, but it is not working correctly. I cant use a segue directly because if the login

8条回答
  •  情歌与酒
    2020-12-01 04:50

    I've got the same problem with login issue. probably we do the same tutorial. After naming your segue identifier you need to replace:

    performSegueWithIdentifier("Klikur", sender: self)
    

    with:

    dispatch_async(dispatch_get_main_queue()){
    
                    self.performSegueWithIdentifier("Klikur", sender: self)
    
    }
    

    type of seque needs to be set as "show (e.g. Push)" in the storyboard segue. Hope it will work.

提交回复
热议问题