iphone - Trying to animate backgroundcolor on a uilabel to achieve a 'fade' effect, but it applies instantly -


i'm trying animate backgroundcolor on uilabel achieve 'fade' effect. code looks this:

uilabel *lbl = ... uicolor *oldcol = lbl.backgroundcolor; lbl.backgroundcolor = [uicolor bluecolor]; [uiview animatewithduration:1.0 animations:^(void) {     lbl.backgroundcolor = oldcol; }]; 

but instantly reverts original colour. tried below, isolate problem:

lbl.backgroundcolor = [uicolor bluecolor]; [uiview animatewithduration:1.0 animations:^(void) {     lbl.backgroundcolor = [uicolor greencolor]; }]; 

and instantly goes green. ideas?

background color of uilabel isn't animatable. see how animate background color of uilabel? possible workaround.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -