I am writing an app that notifies user when its time to take his/her medicine. The label at the top of the page shows a date and the tableView
gets populated with m
There are few functions supported in UITableView for reloading data. See section Reloading the Table View of doc.
Also, see this similar thread, a part from it:
NSRange range = NSMakeRange(0, 1);
NSIndexSet *section = [NSIndexSet indexSetWithIndexesInRange:range];
[self.tableView reloadSections:section withRowAnimation:UITableViewRowAnimationNone];
Also, it is not necessary to reload specific sections, you can just adjust your dataset and call [tableView reloadData]
, it will load the visible cells only. A part from doc:
Call this method to reload all the data that is used to construct the table, including cells, section headers and footers, index arrays, and so on. For efficiency, the table view redisplays only those rows that are visible. It adjusts offsets if the table shrinks as a result of the reload.