UITableView and presentViewController takes 2 clicks to display

前端 未结 8 1603
独厮守ぢ
独厮守ぢ 2020-12-13 18:34

I am using a UITableView to present a variety of viewControllers. Depending on which index is clicked, it will present a different view controller, which can then be dismis

8条回答
  •  清歌不尽
    2020-12-13 19:30

    One reason for this behavior could be that your table view code, and thus the code to start up your other view controllers, is not executed on the main thread. But all code related to UI must be executed on the main thread to work correctly.
    Thus please ensure that the code runs on the main thread, e.g. by setting an appropriate break point.

提交回复
热议问题