I am using an NSMutableArray to populate my tableView.The array’s name is cells. I have a button that adds cells, but when i press the button, the app crashes. The code in my button is:
- (IBAction)outlet1:(id)sender {
[cart.cells addObject:@"1"];
[cart.myTableView reloadData];
}
this button is on a seperate page from the table view, so cart is referring to the tableView page. Any help would be appreciated! Thanks
The exception message means that someone is trying to call a method named
outlet1that has no argument (note the missing colon) while your method’s signature isoutlet1:. You have probably missed the colon of the selector when adding the target/action to your button.