iOS segue freeze for many seconds before showing new view

前端 未结 4 565
甜味超标
甜味超标 2020-12-30 05:26

In the main view of my app I have a table view and two prototype cells. I have configured the segues for each cell using the storyboard. In the view controller I override pr

4条回答
  •  没有蜡笔的小新
    2020-12-30 05:59

    Hard to say unless you post your code that is responding to the tap on the cell and presenting the new view controller.

    One common cause of long delays in UI changes (or having the UI change never happen) is trying to make UI changes from a background thread. Is it possible that your code that is invoking the segue is running on a different thread? You can tell this easily by setting a breakpoint on that code and observing the thread number when it breaks. If the thread number is 0 you're running on the main thread. If it's some other thread number, that's your problem.

提交回复
热议问题