1

I have UITableView and cell's are customized and have a UIImage with UIbutton, UIlabel and another UIbutton. When user clicks the UIImage i want this image to flip and display another image here. The flip should be an animation excatly same as the FlipSide template.

Thanks,

Ashutosh
  • 5,614
  • 13
  • 52
  • 84

1 Answers1

1

You can try with the built-in animations for the same:

[UIView beginAnimations:nil context:context];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:cell cache:YES];
[oldImageView removeFromSuperview];
[cell addSubview:newImageView];
[UIView commitAnimations];

Of course, your cell and imageViews would have to be created/referenced before-hand. I haven't tried this myself but it should do the trick.

tipycalFlow
  • 7,594
  • 4
  • 34
  • 45
  • SO i can make image available throughout the class but are you saying that i should make the cell define for the whole class. Because by default we create the cell in TableView delegate method and release it there. – Ashutosh Mar 26 '12 at 15:30
  • No no, don't keep reference with names, but with tags as [explained here](http://stackoverflow.com/questions/6299391/whats-the-best-way-to-update-an-image-in-my-tableview-image-subview). – tipycalFlow Mar 26 '12 at 15:34