سؤال

I have a tableview and at the time of viewDidLoad there are 20 rows. Now I have a button to add 1 more row data in table. At this time I don't want to reload the table and want to show updated table with last row. Is it possible? If yes then please help me out. Thanks.

هل كانت مفيدة؟

المحلول

You can do it this way

[tableView beginUpdates];
[self.table insertRowsAtIndexPaths:path withRowAnimation:UITableViewRowAnimationRight];
[tableView endUpdates];
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top