I need to handle a case where you can do something with or without animation, instead of:
if (animation)
{
[UIView animateWithBlock:^(){...}];
}
else
{
...
}
I want to do:
[UIView animateWithBlock:^(){...} duration:(animation ? duration : 0)]
but not sure if it works, even if it does, is there any overhead for using this instead of directly change the view?
Thanks
[UIView animateWithBlock:^(){self.view.frame = newFrame} withDuration:0]
vsself.view.frame = newFrame
? – Correia