What is a good way to animate UIViews inside UITableViewCell after a callback?

Posted by erotsppa on Stack Overflow See other posts from Stack Overflow or by erotsppa
Published on 2010-04-27T15:28:02Z Indexed on 2010/04/27 15:43 UTC
Read the original article Hit count: 405

Filed under:
|

We couldn't find a way to animate UIViews inside a UITableCell as an action from a callback.

Suppose in a scenario where you click on a button on the UITableViewCell and it fires off an asynchronous action to download a picture. Suppose further that when the picture is downloaded we want a UIView in the cell to animate the picture to give user a visual feedback that something new is about to be presented.

We couldn't find a way to track down the UIVIew to invoke beginAnimation on because the original cell that the user clicked on might now be used for another row due to the nature of cells being reused when you scroll up and down in the table. In other words we can't keep a pointer to that UITableViewCell. We need to find another way to target the cell and animate it if that row is visible and don't animate if the row is scrolled out of range.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk