You change the default animation timing by setting the current animation context’s duration like this:
[NSAnimationContext beginGrouping]; [[NSAnimationContext currentContext] setDuration:2.0f]; // your code here [NSAnimationContext endGrouping];
注意
The NSAnimationContext duration affects only the animations that do not
have their duration explicitly set. So if we were to use a context to slow
animations, it would not work for the animations that have had their
durations set explicitly as outlined here.