主线程运行
void runOnMainQueueWithoutDeadlocking(void (^block)(void)) { if (NSThread.isMainThread) { block(); } else { dispatch_sync(dispatch_get_main_queue(), block); } }