开发者

How can I instantaneously add a cell to a tableview

Currently, I have a table view that the user can add items and delete items from. However, the adding feature currently works by pulling up a modal view, gathering t开发者_StackOverflow社区he information from there, and adding it into an array from which my tableview is loaded from every time it loads. With this setup I have to reload the entire view whenever data is added.

What I want to do is add a cell, like in this video at about 0:12 http://www.youtube.com/watch?v=SAebrhW3SHg

In this example, a new cell just pops right out when the add button is pushed. How can I do this?


Call -insertRowsAtIndexPaths:withRowAnimation: when you get a button press, and use UITableViewRowAnimationNone to place the cell without any animation. You won't need to reload your table.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜