Изменим имплементацию контроллера таблицы созданного на прошлом уроке.
#import "MainTableViewController.h" @interface MainTableViewController () @property (nonatomic, strong) NSMutableArray *arrayEvents; @end @implementation MainTableViewController - (void)viewDidLoad { [super viewDidLoad]; } - (void)viewWillAppear:(BOOL)animated { NSArray *array = [[UIApplication sharedApplication] scheduledLocalNotifications]; self.arrayEvents = [[NSMutableArray alloc] initWithArray:array]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } #pragma mark - Table view data source - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return self.arrayEvents.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *identifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath]; UILocalNotification *notification = [self.arrayEvents objectAtIndex:indexPath.row]; NSDictionary *dict = notification.userInfo; cell.textLabel.text = [dict objectForKey:@"eventInfo"]; cell.detailTextLabel.text = [dict objectForKey:@"eventDate"]; return cell; } @end