I am writing an application that notifies the user when it is time to take his medicine. The label at the top of the page shows the date, and the tableView filled with the names of the drugs and the time you need to take on that particular day. Sections are now populated based on the amount of medication you need to take on that day. Thus, the number of sections dynamically changes over time; the medicine is planned to be taken on this day. Whenever the user takes the medicine, it is saved in the database as a variable that changes to "1" otherwise, "0" remains.
I also know that I need to reload the section of this particular medicine that day.
Now the question is, how do I achieve this? How to reload a specific section?
for(NSManagedObject *mo in secondEntityArray) { NSDate *temp1 = [mo valueForKey:@"date"]; [dateFormatter setDateFormat:@"yyyy-MM-dd"]; NSString * temp2 = [dateFormatter stringFromDate:temp1]; NSDate *temp3 = [dateFormatter dateFromString:temp2]; NSDate * temp4 = [dateFormatter dateFromString:_dateLabel.text]; if([temp3 compare:temp4] == NSOrderedSame) { if([[mo valueForKey:@"isNotificationFired"] isEqualToString:@"1"] && [[mo valueForKey:@"repeatDays"] isEqualToString:@"Everyday"]) {
source share