As you can see below, the notificationsVC
is a part of the TabBarController which is embedded in a navigationContoller
(lets call it first nC). Then theres a segue from notificationsVC to the second navigationController which will show the messagesVC.
There's a back button in messagesVC
which when pressed should go back to notificationsVC
func backbutton() {
navigationController?.popViewControllerAnimated(true)
}
Now this is obviously not working because the navigationController will get the nearest NC and pop the VC in its stack but it won't let me go back to the notificationsVC
.
Any other alternative?, although I've tried this with no success as well.
self.dismissViewControllerAnimated(true, completion: nil);
Also I'm using the JSQMessagesViewController library to show the messages in messagesVC
which shouldn't matter but still worth mentioning. Thanks for your time!