I'm trying to program a stopwatch. In my AppController.m I can reset, start and stop a watch,... And in my TableViewController I have a array named "list", and all the items in the list get put into my TableView. Now I want to add the time from the stopwatch (AppController.m) into the array "list", like I can do with the button add inside TableViewController.h:
@implementation TableViewController
- (id)init
{
self = [super init];
if (self) {
list = [[NSMutableArray alloc] init];
}
return self;
}
-(IBAction)add:(id)sender {
[list addObject:[[TimeObj alloc] init]];
[tableView reloadData];
}
I don't really have any idea how to do this, so I'm not sure if this is even possible. Do you know how to do this, or any other way to solve this problem?