Thomi
Thomi

Reputation: 649

JSQMessagesViewController back button not visible

I follow this basic tutorial to start playing with JSQMessagesViewController:

https://www.raywenderlich.com/122148/firebase-tutorial-real-time-chat

How can I do to have a back button in the ChatViewController?

When debugging it seems to be here but maybe masked by something.

Thank you for any feedback. Regards

Upvotes: 1

Views: 305

Answers (1)

MQLN
MQLN

Reputation: 2328

Your problem is that the "ChitChat" scene is the root ViewController; there's nothing to go back to!

Even though the Log-In screen appears before the ChiChat VC, you can see how it segues TO the Navigation Controller, which is Embedded in the ChitChat VC.

Think of it like this: Since the Log-In VC appears before the Navigation Controller, it never sees it, and doesn't know that there's a screen to go back to (this is simplified logic).

If you want to have a back button to go back to the Log-In VC, then try playing around with embedding the Navigation Controller in the Log-In VC (By using the editor tab, and then selecting "Embed in" in xCode, if you've never done this before)

Upvotes: 1

Related Questions