I have found a solution to this issue... found it at this answer: iOS Dismissing a popover that is in a UINavigationController
But, there was a small additional step to make... correct a typo in the answer and change the "dismissPopover" method into an NSNotification Method. I added a segue for the popover, which normally isn't necessary. The key though, is the setting of the parent's definition of the popover to the UIStoryboardPopoverSegue.
Then, use notification to let the parent know it should dismiss.
From the parent view:
- (void)viewDidLoad
{
... other loading code...
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(dismissSearch:) name:@"dismissSearch" object:nil];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"SearchSegue"])
{
[segue.destinationViewController setDelegate:self];
_searchPopover = [(UIStoryboardPopoverSegue *)segue popoverController];
}
}
- (void)dismissSearch:(NSNotification *)notification
{
NSLog(@"SearchPopover dismiss notification?");
[_searchPopover dismissPopoverAnimated:YES];
}
In my child view (SearchView). Ideally, it would be in the didSelectRowAtIndexPath. I found it also worked in the segue to the view where it will display the searched item, which is where I would normally place an addObserver. In this case, it is a postNotification...
[NSNotificationCenter.defaultCenter postNotificationName:@"dismissSearch" object:nil];
One last note: I was using an IBAction that checked for popover visibility when tapping the button... display or dismiss. Found that having this as well as the other method was causing the popover to dismiss immediately upon tapping the button! Commenting out the if/else check for visibility solved that!
Thanks for rdelmar for leading me on this path!