Unwind segues uses a run-time search by first asking the parent view controller to go to the chain of view controllers submitted through segue until it finds the correct unwinding method. But there is no chain here, since the popover was created programmatically and not using the popover segue.
No callbacks occur because there is no segue link back to the parent view controller. Unwind segues is an abstract form of delegation, so it would look like you didn’t forget to assign a delegate and not receive any callbacks.
The solution is to create a popover using segue in Interface Builder, rather than creating it programmatically using the configChartTapped: method.
Steps:
First, drag the control from the panel onto the view element in the view controller view onto the presented view controller and select the travel segment:

In view view controller, execute prepareForSegue: to get a link to the popover controller:
- (void)prepareForSegue:(UIStoryboardPopoverSegue *)segue sender:(id)sender { self.popover = segue.popoverController; }
Then we implement shouldPerformSegueWithIdentifier: to restore the show / hide behavior is similar to configChartTapped: ::
- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender { if (self.popover.isPopoverVisible) { [self.popover dismissPopoverAnimated:YES]; return NO; } else { return YES; } }
Finally, in Interface Builder, set the correct popover content size for the presented view controller:

This will allow you to relax to cancelConfig: by clicking the cancel button from the popover, and also show / hide the popover when you click the button that represents it.
source share