我需要执行异步函数执行,因为它阻塞了主线程,因此UI不可用。看了stackoverflow的题目,知道了异步函数的三种方式。一个例子:[NSThreaddetachNewThreadSelector:@selector(showSpinner:)toTarget:selfwithObject:self.view];//or[selfperformSelectorInBackground:@selector(showSpinner:)withObject:self.view];//orNSInvocationOperation*invOperation=[[NSInvocationOpe