From the image, it looks like your model is a set of actions that the user plans to take. I would arrange it like this:
1) MyAction - NSObject . MyAction - :
- (NSString *)timeRemainingString {
NSDate *now = [NSDate date];
NSTimeInterval secondsLeft = [self.dueDate timeIntervalSinceDate:now];
NSString *answer = [NSString stringWithFormat:@"seconds left = %f", secondsLeft];
return answer;
}
2) StatusViewController , NSArray MyActions, NSTimer ( ), , .
- (void)timerFired:(NSTimer *)timer {
[self.tableView reloadData];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.model.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
MyAction *myAction = [self.model objectAtIndex:indexPath.row];
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.textLabel.text = [myAction timeRemainingString];
cell.detailTextLabel.text = [myAction name];
}