Hey guys, (relatively, I believe) simple question here,
I have a UITableViewController with its UITableView, with its determined number of cells. If a user taps on a cell, an image is inserted into the respective cell’s imageView property, like so:
[self.tableView cellForRowAtIndexPath:chosenPersonIndexPath].imageView.image = [UIImage imageNamed:@"tick.jpeg"];
(where chosenPersonIndexPath is simply the selected cell’s index path)
Is there any way to animate this? As is, the UITableViewController simply sticks in the image with no transition whatsoever. All I’m asking is if there is a way to possibly animate this, and if so, how?
Many thanks in advance!
~Joaquim
Given that UIImageView instances are UIView instances, you can animate them just like any other UIView:
The animation in the tableView:didSelectRowAtIndexPath: method could include flips, size changes, or any other kind of (animatable) property change. Check out for the “Animatable Properties” chapter in the “Core Animation Programming Guide” in the iPhone SDK documentation for more information.
Hope this helps!