I have a UIViewController which has a button that performs a modal segue to a UIViewController as a Form Sheet. On that form sheet is a cancel button with an unwind segue back to the original UIViewController. This seems to work perfectly happily and dismisses the form sheet.
As soon as I select the original UIViewController and select the option in XCode to Embed in a Navigation Controller, the unwind segue no longer seems to work and the modal form sheet will no longer cancel.
I'm sure there is a simple explanation, but it is currently evading me, so any thoughts welcomed.
Thanks.
I don't know why you get the behavior you're seeing, I see it too. It happens for both the page sheet and form sheet presentations, but not for full screen. However, the unwind segue is still calling the method you put in the original controller (the one you connected the unwind segue to). So, all you need to do is put a line in that method:
[self dismissViewControllerAnimated:YES completion:nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With