I am trying to implement a favorites window for a quotes application.
right now I have a button implemented with the following code: - (IBAction)next2 { [favoritesViewController.listData addObject:viewController.label.text]; [navigationController pushViewController:favoritesViewController animated:YES]; }
here favoritesViewController is the table view controller for the favorites view, and viewController is the main view which displays the quotes. I was hoping that each time the button was pressed whatever the text that was displayed at that time would be added to the favorites window, but at the moment it only works the first time the button is pressed, and after that the favorites view is unchanged. Why is this happening?