关于iphone:在willAnimateRotationToInterfaceOrientation中禁用动画吗?

Disable Animation while in willAnimateRotationToInterfaceOrientation?

我有一个滚动视图,上面有很多照片缩略图,就像在照片应用程序/图像选择器中一样。旋转时,我想在旋转动画的中间(在willAnimateRotationToInterfaceOrientation中)更新滚动视图,但是我只希望它在不使用动画的情况下进行更新(不希望缩略图在移动到新缩略图时进行动画处理)位置)。我该怎么做?我正在使用setCenter在旋转发生时移动缩略图。我已经尝试了所有其他旋转方法,但是它们没有完成工作,因为我需要在旋转动画发生时进行更新,因为那是最佳时机。


willAnimateRotationToInterfaceOrientation方法中使用以下功能:

1
2
3
[UIView setAnimationsEnabled:NO];
//insert what you want to not be animated here
[UIView setAnimationsEnabled:YES];