0

I have a view that is on the navigation stack. From this view a user can navigate to a few different views. When navigating back to this view from one of those various views, I need to know which view the user came from.

Example: User goes from HomeView to View1 using navigation controller. When navigating back to HomeView, how can I determine that they are coming from View1? I thought of using a global variable, but that seems hokey.

Thank you.

edhnb
  • 2,122
  • 3
  • 24
  • 38

1 Answers1

0

You can use delegate or Notification.

Naveen Thunga
  • 3,675
  • 2
  • 24
  • 31