ViewController Appears to Transition Twice

前端 未结 4 1615
孤街浪徒
孤街浪徒 2021-02-10 05:23

Problem Summary

My mainVC --> second VC transtion appears to run twice. However, what\'s odd is that the second VC\'s viewDidLoad only runs once. This i

4条回答
  •  盖世英雄少女心
    2021-02-10 05:43

    I had ALMOST the same problem and my second VC was sliding twice. The problem was with that segue arrow in my Main.storyboard. I control-dragged from a button in first VC and not from my VC (that little yellow circle on top of every VC), so I deleted that segue arrow and control-dragged from VC yellow circle to my second VC and it fixed the problem.

    Also this is how I used performSegue function:

    @IBAction func toSignUp(_ sender: Any) {
        performSegue(withIdentifier: "signUp", sender: nil)
    }
    

    Hope this was helpful.

提交回复
热议问题