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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -