让程序回到主线程的方法有:
1、通过GCD返回主线程
dispatch_async(dispatch_get_main_queue(), ^{ //code here });
2、利用方法
- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait
让程序回到主线程的方法有:
1、通过GCD返回主线程
dispatch_async(dispatch_get_main_queue(), ^{ //code here });
2、利用方法
- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait