I have created several .xib files with a navigation controller and some table view.I have a barButton. when I click that one it pushes one view onto another, now I want to come to the previous view, that one can be done by push. But my previous view is embedded in a navigation controller(here I can see the previous view but with all navigation functionality disable). So here I want to perform unwind segue like we do in storyboard. But I am not using any storyboard. I just want to know that what can I do to get the similar result as unwind segue while using only .xib files?
Asked
Active
Viewed 421 times
1 Answers
0
use [self.navigationController popViewControllerAnimated:YES]
in the view controller from which you want to perform the unwind segue.

Olga Nesterenko
- 1,324
- 11
- 15
-
That will not work because my top view is root view controller and you cannot pop the last item on the stack. – D.R. Rout Jun 08 '16 at 04:02
-
Anyway thank you but i got the answer : [link](https://www.youtube.com/watch?v=djpEr0kgnUY) @askatasuna – D.R. Rout Jun 08 '16 at 05:02
-
try with this answer: https://stackoverflow.com/a/30010908/3430658 – Andres Paladines Mar 04 '21 at 22:22