此方面明明是在主线程中运行的,但运行其他代码,例如关闭当前画面,总会卡顿几秒。 解决办法在需要执行的代码加上dispatch_async(dispatch_get_main_queue(), ^{ xxxxx });