How to reject popovers in iOS 5?

I have a PatientTableViewController on the main side of the iPad, which has a button for adding a new patient. He navigates to this NewPatientViewController through the camp segment.

In NewPatientViewController , I have a Finish button that delegates back to PatientTableViewController :

- (void)newPatientViewController:(NewPatientViewController *)sender withZipCode:(NSNumber *)zipCode andFirstName:(NSString *)firstName andLastName:(NSString *)lastName { [self dismissViewControllerAnimated:YES completion:NULL]; [self dismissModalViewControllerAnimated:YES]; [sender dismissModalViewControllerAnimated:YES]; [sender dismissViewControllerAnimated:YES completion:NULL]; } 

None of the methods I tried above work. However, if I use Modal segue, everything works fine. Wat?

+4
source share
2 answers

Finally, find out with this message.

Basically, you need to have a variable that tracks segue (which you need to add to UIStoryboardPopoverSegue ) and a little weirder.

I wrote a post describing the solution in more detail.

+5
source

Have you tried dismissPopoverAnimated: in the UIPopoverController class?

+4
source

Source: https://habr.com/ru/post/1396087/


All Articles