开发者

UITableView: Hide cells animated?

I'm trying to make some of my cells of a UITableView invisible. Pushing a button they are supposed to toggle the visibility. I开发者_如何学C tried the Hidden property of the UITableViewCell class but it cannot be animated. Setting the cell's Frame to a height of 0 will make the cell small, but not hidden and it does not animate either.

Any ideas?


What you should use is [UITableView deleteRowsAtIndexPaths:withRowAnimation:] method. Make sure to adjust your tableView:numberOfRowsInSection: method to reflect the number of rows that have been deleted or your app will crash.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜