iOS线程通信

1.回到主线程执行,附带参数,指定模式
self performSelectorOnMainThread:<#(nonnull SEL)#> withObject:<#(nullable id)#> waitUntilDone:<#(BOOL)#> modes:<#(nullable NSArray *)#>

2.回到主线程执行,附带参数
self performSelectorOnMainThread:(nonnull SEL) withObject:<#(nullable id)#> waitUntilDone:<#(BOOL)#>

3.指定线程执行,附带参数
self performSelector:<#(nonnull SEL)#> onThread:<#(nonnull NSThread *)#> withObject:<#(nullable id)#> waitUntilDone:<#(BOOL)#>

4.指定线程执行,附带参数,指定模式
self performSelector:<#(nonnull SEL)#> onThread:<#(nonnull NSThread *)#> withObject:<#(nullable id)#> waitUntilDone:<#(BOOL)#> modes:<#(nullable NSArray *)#>

你可能感兴趣的:(iOS线程通信)