3
votes

I'm trying to implement an unwind segue that will take me from the last view controller back to the todo-list controller.

Here's my storyboard

image

Without the tab bar controller, the unwind segue works fine. However, as soon as I add the tab bar controller, the unwind stopped triggering.

What am I doing wrong?

Thanks

Edit: Also, actions created on the bar button in the last view controller do not trigger when the tab bar controller is implemented

2
Why do you have the second NavigationController? - Mika

2 Answers

3
votes

I have had a similar situation and I was able to resolve it by setting the Modal segue to "Presentation: Current Context" instead of "Default" in the Attributes Inspector (screenshot here: https://cloudup.com/cHFyH8OOY9D).

That is, the segue arrow between the Table View and the second Navigation Controller in your screenshot above.

0
votes

I've had a similar issue with unwind segues not being called with view controllers within a TabBarController.

The solution is to create a custom TabBarController class, and have the unwind segue action in that class. You will then be able to pass a message to the current tab bar view controller.