You can Unwind segue. You need to create method in tableView (not details view) which accept UIStoryboardSegue:
- (IBAction)unwindToViewController:(UIStoryboardSegue *)segue {
UIViewController* sourceViewController = segue.sourceViewController;
}
After that in storyboard in detail view controller you can see 'exit' icon, this is unwind segue control drag from it to that method and you will create new segue.
Unwind segue is made for deal with this kind of jobs. You can google this to find out more details.