I have a button on 1 page and a tableView on another page. When the button is pressed, i want it to add a cell to the tableView, and when i switch pages to see the tableView, i want that new cell there. But my button doesnt add the cell to my table. Here is the code for the button:
Code:
- (IBAction)outlet1:(id)sender {
[cart.cells addObject:@"1"];
[cart.myTableView reloadData];
}
cart is refering to the second page with the tableView. And `cells` is my MutableArray on the tableView page. I also call
Code:
[myTableView reloadData];
in the viewWillAppear method on the tableView page. However, i cant see my cell. Can someone help please?