I'm trying to get a popover to dismiss itself when I click a button, but it doesn't seem to be working. I know there are a few questions regarding this, but I think my set up is slightly different. In storyboards I have the following setup:
View Controller -> (segue popover) -> View Controller 2
View Controller 2 has a "Done" button linked to an IBAction as follows:
- (IBAction)returnCommand:(id)sender {
[self dismissViewControllerAnimated:YES completion:nil];
}
I know that you can click outside of the popup to dismiss it, but I want to do a few other things when Done is pressed. With this code, nothing happens when I click the "done" button.