多线程

让程序回到主线程的方法有:

1、通过GCD返回主线程

dispatch_async(dispatch_get_main_queue(), ^{
        //code here
    });    

2、利用方法

- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait

原文地址:https://www.cnblogs.com/mystory/p/2829246.html