Skip to content
Discussion options

You must be logged in to vote

Hi @ibcylon, thanks for your question. You're right that goBack will go back to the previous screen, regardless of whether the current screen was pushed or presented. And pop does the same thing, but in debug builds it will stop program execution if the current screen was presented rather than pushed. This might be useful if you want to get an early warning while developing that your assumptions about the navigation state are not correct.

So it's a matter of personal preference: if you want to verify your assumption that the current screen has been pushed, use pop; otherwise, use goBack as it's more flexible.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by johnpatrickmorgan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants