I have a UIBarButtonItem and would like to programmatically set the action that goes to the previous controller (in my case, my previous view is a UITableViewController).
[self dismissViewControllerAnimated:YES completion:nil];