iOS线程通信
2017-06-06 本文已影响66人
七维树
1.回到主线程执行,附带参数,指定模式
self performSelectorOnMainThread:<#(nonnull SEL)#> withObject:<#(nullable id)#> waitUntilDone:<#(BOOL)#> modes:<#(nullable NSArray<NSString *> *)#>
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<NSString *> *)#>