0
我爲動畫下拉刷新滾動視圖內容插圖。iOS的代碼崩潰的commitAnimations而在主線程
NSLog(@" in main thread? %d", [NSThread isMainThread]); // prints 1
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:.3];
[scrollView setContentInset:UIEdgeInsetsMake(0.0f, 0.0f, scrollView.contentInset.bottom, 0.0f)];
// Crash here
[UIView commitAnimations];
我在提交動畫時崩潰了,並且崩潰了主線程。如果我刪除這段代碼,我的應用程序就不會崩潰。如果這個代碼塊的範圍很窄,那麼在這一點上可能會導致崩潰?