What is the significance of WaitUntilDOne in performSelectorOnMainThread?

前端 未结 4 870
攒了一身酷
攒了一身酷 2021-02-15 16:34

What is the significance of WaitUntilDOne in performSelectorOnMainThread?

IN what way the YES or NO set to Wait

4条回答
  •  耶瑟儿~
    2021-02-15 17:02

    If you say NO, performSelectorOnMainThread doesn't block, and will execute the next line of code after the performSelectorOnMainThread immediately without waiting for the main thread to execute your selector.

    If you say YES, the thread from which you called performSelectorOnMainThread will block execution at that line until the main thread has executed your selector, then it will continue.

提交回复
热议问题