I have been reading that Apple recommends to use block-based animations instead of CATransaction
Before, I was using this code to disable animations:
For MonoTouch (C#) users, here is a helper class:
public class UIViewAnimations : IDisposable
{
public UIViewAnimations(bool enabled)
{
_wasEnabled = UIView.AnimationsEnabled;
UIView.AnimationsEnabled = enabled;
}
public void Dispose()
{
UIView.AnimationsEnabled = _wasEnabled;
}
bool _wasEnabled;
}
Example:
using (new UIViewAnimations(false))
imageView.Frame = GetImageFrame();