ViewController Appears to Transition Twice

前端 未结 4 1631
孤街浪徒
孤街浪徒 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:42

    One reason might be that the controller which is being pushed have another transition in its viewWillAppear() method.

    In my case, I had put textField.becomesFirstResponder() in viewWillAppear() method which triggers keyboard to show

    Move any such method to viewDidAppear()

提交回复
热议问题