Low-level details of the implementation of performSelectorOnMainThread:

后端 未结 4 1501
情歌与酒
情歌与酒 2021-02-06 07:13

Was wondering if anyone knows, or has pointers to good documentation that discusses, the low-level implementation details of Cocoa\'s \'performSelectorOnMainThread:\' method.

4条回答
  •  名媛妹妹
    2021-02-06 07:49

    The documentation for NSObject's performSelectorOnMainThread:withObject:waitUntilDone: method says:

    This method queues the message on the run loop of the main thread using the default run loop modes—that is, the modes associated with the NSRunLoopCommonModes constant. As part of its normal run loop processing, the main thread dequeues the message (assuming it is running in one of the default run loop modes) and invokes the desired method.

提交回复
热议问题