I have tableview with it's cells containing buttons, and on each button I load in image within the cellForRowAtIndexPath method. So something like:
I have a page full of image thumbnails that are loaded using the method above but they just abruptly appear on the screen. So I would like to display one thumbnail at a time and maybe have them fade up one by one, something like this (at the end of the above):
This does in fact work. It fades up the image as it's supposed to. The problem is it fades ALL the images up the same time, which leads me to believe there is no way to do this. Any thoughts?
Cheers.
Code:
int i=0,i1=0;
while(i<noImages){
UIImage *imageNew = [[UIImage alloc] init] ;
imageNew=[imageNew maskImage:[UIImage imageWithContentsOfFile: item.image]];
UIImage *buttonImageNormal=imageNew;
[button setBackgroundImage:buttonImageNormal forState:UIControlStateNormal ];
[hlcell.contentView addSubview:button];
i++;
}
Code:
[button setAlpha:0.0f];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.75];
[button setAlpha:1.0f];
[UIView commitAnimations];
This does in fact work. It fades up the image as it's supposed to. The problem is it fades ALL the images up the same time, which leads me to believe there is no way to do this. Any thoughts?
Cheers.