Hier fand ich, wie UIButton
‚s Titeländerung mit inzwischen veraltet beginAnimations:context:
Methode zu animieren:Animate UIButton Titel ändern
UIBUtton title animation for iPhone
Wie das gleiche zu tun mit aktuellen APIs?
Update:
Ich habe versucht, blockbasierte Animationen zu verwenden:
NSTimeInterval animationDuration = animated ? 1.f : 0.f;
[UIView animateWithDuration:animationDuration delay:0.f options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction animations:^{
[button setTitle:newTitle forState:UIControlStateNormal];
[button setTitleColor:newTitleColor forState:UIControlStateNormal];
} completion:nil];
Der Farbwechsel animiert nicht.
Bitte geben Sie die Dokumentation überprüfen, tt alle auf UIView erläutert ist: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview /uiview.html mit einer klaren Erläuterung des 'beginAnimations: context:' -Ersatzes. –