- (BOOL)transitionToNextPhase
{ // 保证代码在主线程
if (![[NSThread currentThread] isMainThread])
{
dispatch_sync(dispatch_get_main_queue(),^{
[self transitionToNextPhase];
});
return YES;
}
//后续执行代码
}
2023-02-27 07:15:23
- (BOOL)transitionToNextPhase
{ // 保证代码在主线程
if (![[NSThread currentThread] isMainThread])
{
dispatch_sync(dispatch_get_main_queue(),^{
[self transitionToNextPhase];
});
return YES;
}
//后续执行代码
}