Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ZeeG

macrumors member
Original poster
May 24, 2005
39
0
I want to fade out a UIImage in my application, and it works fine on simulator, but I'm getting weird flickering when running on iPhone.
Following is the code I used.
Please help me resolving this problem.
Thanks,

Code:
 [messageLabelBadge setImage:badge];

     [messageLabelBadge setAlpha:100.0];

     [messageLabelBackground setAlpha:100.0];

     messageLabel.text = message;

     [messageLabel setAlpha:100.0];

     [UIView beginAnimations :nilcontext:NULL];

     [UIView setAnimationDuration:3];

     [messageLabel setAlpha:0];

     [messageLabelBackground setAlpha:0];

     [messageLabelBadge setAlpha:0];

     [UIView commitAnimations];
 

ZeeG

macrumors member
Original poster
May 24, 2005
39
0
Just thought I'd mention that alpha values are restricted to the range from 0.0 to 1.0. Don't know if that's the cause though.

Thank you! you saved me :)
I don't know why I thought the range is 0 to 100. :(
I read API but probably wasn't careful about the value..
Thanks a lot!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.