I am animating a scroll view content inset for pull down to refresh.
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];
I get a crash when committing the animations and it crashes it the main thread. If I remove this block of code, my app never crashes. What could be causing a crash at this point if it's pretty much narrowed down to this block of code?