Re: [iOS] How to animate the height of a UITableViewCell
Re: [iOS] How to animate the height of a UITableViewCell
- Subject: Re: [iOS] How to animate the height of a UITableViewCell
- From: WT <email@hidden>
- Date: Mon, 14 Mar 2011 16:01:46 -0300
On Mar 14, 2011, at 2:27 PM, Conrad Shultz wrote:
> WT wrote:
>> When the object displayed in a given UITableViewCell is in the
>> loading state, the cell's height is just a bit larger than a
>> UILabel's height. When the object is in its "loaded" state, the cell
>> is quite a bit taller, to accommodate the rest of the information.
>>
>> I already have all of this working just fine (including the fact that
>> each cell's object updates its content asynchronously), but the
>> transition from short cell to tall cell is abrupt and I would like to
>> make it be a smooth animation.
>>
>> Can someone please offer some pointers on how to accomplish that?
>
> I have found that using:
>
> - - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths
> withRowAnimation:(UITableViewRowAnimation)animation
>
> works well, especially when used with UITableViewRowAnimationTop as the
> row animation.
Hi Conrad,
thanks for your reply. As I posted subsequently to my original message, I found that very answer you recommended in several places online, but some of them suggest bracketing the call to -reloadRowsAtIndexPaths:withRowAnimation: with calls to -beginUpdates and -endUpdates, while others don't. Is this bracketing necessary?
Thanks again.
WT_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden