I am pretty new to Objective-C, and trying to create a to-do list app with a table view. I am trying to keep adding strings to my mutable array as the button is pressed. But each time I press the button only the last string gets added to the array.
- (IBAction)notebutton:(UIButton *)sender {
NSMutableArray *mystr = [[NSMutableArray alloc] init];
NSString *name = _noteField.text;
[mystr addObject:name];
[self.tableView reloadData];
}